How to fix Websocket handshake failed
I am working on a chat app using Django channels and the Websocket code is handled by JavaScript but no matter how I change the code I get the same handshake failed error.
On the console it says the chat is not found
I am using uvicorn instead of Daphne
Somebody help me
/r/djangolearning
https://redd.it/1j0x0et
I am working on a chat app using Django channels and the Websocket code is handled by JavaScript but no matter how I change the code I get the same handshake failed error.
On the console it says the chat is not found
I am using uvicorn instead of Daphne
Somebody help me
/r/djangolearning
https://redd.it/1j0x0et
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
marsopt: Mixed Adaptive Random Search for Optimization
marsopt (Mixed Adaptive Random Search for Optimization) is a flexible optimization library designed to tackle complex parameter spaces involving continuous, integer, and categorical variables. By adaptively balancing exploration and exploitation, marsopt efficiently hones in on promising regions of the search space, making it an ideal solution for hyperparameter tuning and black-box optimization tasks.
**marsopt GitHub Repository**
# What marsopt Does
Adaptive Random Search: Utilizes a mixture of random exploration and elite selection to efficiently navigate large parameter spaces.
Mixed Parameter Support: Handles floating-point (with log-scale), integer, and categorical variables in a unified framework.
Balanced Exploration & Exploitation: Dynamically adjusts sampling noise and strategy to home in on optimal regions without getting stuck in local minima.
Flexible Objective Handling: Supports both minimization and maximization objectives, adapting seamlessly to various optimization tasks.
# Key Features
1. Dynamic Noise Adaptation: Automatically scales the search around promising areas, refining parameter estimates.
2. Elite Selection: Retains top-performing trials to guide subsequent searches more effectively.
3. Log-Scale & Categorical Support: Efficiently explores a wide range of values, including complex discrete choices.
4. Performance Optimization: Demonstrates up to 150× faster performance compared to Optuna’s TPE sampler for certain continuous parameter optimizations.
5. Scalable & Versatile: Excels in both small, focused searches and extensive, high-dimensional parameter
/r/Python
https://redd.it/1j0vwru
marsopt (Mixed Adaptive Random Search for Optimization) is a flexible optimization library designed to tackle complex parameter spaces involving continuous, integer, and categorical variables. By adaptively balancing exploration and exploitation, marsopt efficiently hones in on promising regions of the search space, making it an ideal solution for hyperparameter tuning and black-box optimization tasks.
**marsopt GitHub Repository**
# What marsopt Does
Adaptive Random Search: Utilizes a mixture of random exploration and elite selection to efficiently navigate large parameter spaces.
Mixed Parameter Support: Handles floating-point (with log-scale), integer, and categorical variables in a unified framework.
Balanced Exploration & Exploitation: Dynamically adjusts sampling noise and strategy to home in on optimal regions without getting stuck in local minima.
Flexible Objective Handling: Supports both minimization and maximization objectives, adapting seamlessly to various optimization tasks.
# Key Features
1. Dynamic Noise Adaptation: Automatically scales the search around promising areas, refining parameter estimates.
2. Elite Selection: Retains top-performing trials to guide subsequent searches more effectively.
3. Log-Scale & Categorical Support: Efficiently explores a wide range of values, including complex discrete choices.
4. Performance Optimization: Demonstrates up to 150× faster performance compared to Optuna’s TPE sampler for certain continuous parameter optimizations.
5. Scalable & Versatile: Excels in both small, focused searches and extensive, high-dimensional parameter
/r/Python
https://redd.it/1j0vwru
GitHub
GitHub - sibirbil/marsopt: Mixed Adaptive Random Search (MARS) for Optimization
Mixed Adaptive Random Search (MARS) for Optimization - sibirbil/marsopt
Flask Async Mail
🚀 Introducing Flask-Async-Mail! 📧
Hey everyone! I just released Flask-Async-Mail, a lightweight and flexible asynchronous email-sending library for Flask apps using Celery. 🎉
🔹 Features:
✅ Supports both synchronous & asynchronous email sending
✅ Works with Celery & Redis
✅ Supports plaintext & HTML emails
✅ Simple setup & easy integration with Flask
👉 Try it out & contribute!
📦 PyPI: https://pypi.org/project/flask-async-mail/
💻 GitHub: https://github.com/manitreasure1/flas-async-mail.git
I’d love your feedback, contributions, and ⭐ stars on GitHub! Let’s build something awesome together. 🚀🔥
\#Flask #Python #Async #Email #OpenSource
/r/flask
https://redd.it/1j10wib
🚀 Introducing Flask-Async-Mail! 📧
Hey everyone! I just released Flask-Async-Mail, a lightweight and flexible asynchronous email-sending library for Flask apps using Celery. 🎉
🔹 Features:
✅ Supports both synchronous & asynchronous email sending
✅ Works with Celery & Redis
✅ Supports plaintext & HTML emails
✅ Simple setup & easy integration with Flask
👉 Try it out & contribute!
📦 PyPI: https://pypi.org/project/flask-async-mail/
💻 GitHub: https://github.com/manitreasure1/flas-async-mail.git
I’d love your feedback, contributions, and ⭐ stars on GitHub! Let’s build something awesome together. 🚀🔥
\#Flask #Python #Async #Email #OpenSource
/r/flask
https://redd.it/1j10wib
Help Needed: Improving My Flask + Celery Email Library for Open Source
Hey everyone,
I'm building an **open-source Python library** that integrates **Flask and Celery** for handling asynchronous email sending. The goal is to make it simple for Flask users to:
✅ Initialize Celery with their Flask app
✅ Configure SMTP settings dynamically via `app.config`
✅ Send emails asynchronously using Celery tasks
**Current Structure:**
1️⃣ **FlaskCelery** \- A wrapper to initialize Celery with Flask
2️⃣ **SendMail** \- Handles SMTP configuration and sending emails
3️⃣ **Celery Task** \- Sends emails asynchronously (without retry logic)
# What I Need Help With:
🔹 Ensuring the Celery task integrates smoothly with Flask's configuration
🔹 Best practices for handling SMTP settings securely
🔹 Optimizing the structure for maintainability and scalability
[demo.py](http://demo.py)
app.config["SMTP_HOST"]=os.environ.get('SMTP_HOST')
app.config["USE_TLS"]=os.environ.get('USE_TLS')
app.config["USE_SSL"]=os.environ.get('USE_SSL')
app.config["SENDER"]=os.environ.get('SENDER')
app.config["PASSWORD"] =os.environ.get('PASSWORD')
celery = FlaskCelery()
celery.init_app(app)
mailer = SendMail(app.config.items())
u/celery.task
def send_client_mail():
mailer.send_email(
subject="Hello, I'am FlaskCelery",
/r/flask
https://redd.it/1j0yrwq
Hey everyone,
I'm building an **open-source Python library** that integrates **Flask and Celery** for handling asynchronous email sending. The goal is to make it simple for Flask users to:
✅ Initialize Celery with their Flask app
✅ Configure SMTP settings dynamically via `app.config`
✅ Send emails asynchronously using Celery tasks
**Current Structure:**
1️⃣ **FlaskCelery** \- A wrapper to initialize Celery with Flask
2️⃣ **SendMail** \- Handles SMTP configuration and sending emails
3️⃣ **Celery Task** \- Sends emails asynchronously (without retry logic)
# What I Need Help With:
🔹 Ensuring the Celery task integrates smoothly with Flask's configuration
🔹 Best practices for handling SMTP settings securely
🔹 Optimizing the structure for maintainability and scalability
[demo.py](http://demo.py)
app.config["SMTP_HOST"]=os.environ.get('SMTP_HOST')
app.config["USE_TLS"]=os.environ.get('USE_TLS')
app.config["USE_SSL"]=os.environ.get('USE_SSL')
app.config["SENDER"]=os.environ.get('SENDER')
app.config["PASSWORD"] =os.environ.get('PASSWORD')
celery = FlaskCelery()
celery.init_app(app)
mailer = SendMail(app.config.items())
u/celery.task
def send_client_mail():
mailer.send_email(
subject="Hello, I'am FlaskCelery",
/r/flask
https://redd.it/1j0yrwq
PhotoFF a CUDA-accelerated image processing library
Hi everyone,
I'm a self-taught Python developer and I wanted to share a personal project I've been working on: PhotoFF, a GPU-accelerated image processing library.
## What My Project Does
PhotoFF is a high-performance image processing library that uses CUDA to achieve exceptional processing speeds. It provides a complete toolkit for image manipulation including:
- Loading and saving images in common formats
- Applying filters (blur, grayscale, corner radius, etc.)
- Resizing and transforming images
- Blending multiple images
- Filling with colors and gradients
- Advanced memory management for optimal GPU performance
The library handles all GPU memory operations behind the scenes, making it easy to create complex image processing pipelines without worrying about memory allocation and deallocation.
## Target Audience
PhotoFF is designed for:
- Python developers who need high-performance image processing
- Data scientists and researchers working with large batches of images
- Application developers building image editing or processing tools
- CUDA enthusiasts interested in efficient GPU programming techniques
While it started as a personal learning project, PhotoFF is robust enough for production use in applications that require fast image processing. It's particularly useful for scenarios where processing time is critical or where large numbers of images need to be processed.
## Comparison with Existing Alternatives
Compared to existing Python image processing libraries:
- vs. Pillow/PIL:
/r/Python
https://redd.it/1j13hm4
Hi everyone,
I'm a self-taught Python developer and I wanted to share a personal project I've been working on: PhotoFF, a GPU-accelerated image processing library.
## What My Project Does
PhotoFF is a high-performance image processing library that uses CUDA to achieve exceptional processing speeds. It provides a complete toolkit for image manipulation including:
- Loading and saving images in common formats
- Applying filters (blur, grayscale, corner radius, etc.)
- Resizing and transforming images
- Blending multiple images
- Filling with colors and gradients
- Advanced memory management for optimal GPU performance
The library handles all GPU memory operations behind the scenes, making it easy to create complex image processing pipelines without worrying about memory allocation and deallocation.
## Target Audience
PhotoFF is designed for:
- Python developers who need high-performance image processing
- Data scientists and researchers working with large batches of images
- Application developers building image editing or processing tools
- CUDA enthusiasts interested in efficient GPU programming techniques
While it started as a personal learning project, PhotoFF is robust enough for production use in applications that require fast image processing. It's particularly useful for scenarios where processing time is critical or where large numbers of images need to be processed.
## Comparison with Existing Alternatives
Compared to existing Python image processing libraries:
- vs. Pillow/PIL:
/r/Python
https://redd.it/1j13hm4
GitHub
GitHub - offerrall/photoff
Contribute to offerrall/photoff development by creating an account on GitHub.
Sunday Daily Thread: What's everyone working on this week?
# Weekly Thread: What's Everyone Working On This Week? 🛠️
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟
/r/Python
https://redd.it/1j1dkk8
# Weekly Thread: What's Everyone Working On This Week? 🛠️
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟
/r/Python
https://redd.it/1j1dkk8
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Just Published Video demonstrating How To Create Weather App in Django Using OpenWeatherMap API
Let me know your thoughts on this.
Want to build a weather app using Django? In this tutorial, I’ll show you step-by-step how to create a weather application using Django and the OpenWeatherMap API. This is a beginner-friendly project that will help you understand API integration, Django views, templates, and more!
What You’ll Learn:
How to set up a Django project
How to fetch weather data using the OpenWeatherMap API
How to display real-time weather data in Django templates
How to handle user input and API requests in Django
Prerequisites: Basic knowledge of Python & Django
If you find this video helpful, please like, comment, and subscribe!
https://www.youtube.com/watch?v=FwEnjw228Ng&t=694s
/r/django
https://redd.it/1j16e72
Let me know your thoughts on this.
Want to build a weather app using Django? In this tutorial, I’ll show you step-by-step how to create a weather application using Django and the OpenWeatherMap API. This is a beginner-friendly project that will help you understand API integration, Django views, templates, and more!
What You’ll Learn:
How to set up a Django project
How to fetch weather data using the OpenWeatherMap API
How to display real-time weather data in Django templates
How to handle user input and API requests in Django
Prerequisites: Basic knowledge of Python & Django
If you find this video helpful, please like, comment, and subscribe!
https://www.youtube.com/watch?v=FwEnjw228Ng&t=694s
/r/django
https://redd.it/1j16e72
YouTube
How To Create Weather App in Django Using OpenWeatherMap API | Django Tutorial For Beginners
Want to build a weather app using Django? In this tutorial, I’ll show you step-by-step how to create a weather application using Django and the OpenWeatherMap API. This is a beginner-friendly project that will help you understand API integration, Django views…
Why am I facing this issue with CSRF ?
I do have decent experience in django but working first time on django+React, so couldn't get my head around this problem even after lot of research on internet.
I would be grateful if you guys can help me out on this one
So I have been trying to develop this Django + React app and deploy it on [repl.it](http://repl.it)
The URL for my hosted frontend is of form "SomethingFrontend.replit.app"
and for backend, it would be "SomethingBackend.replit.app"
below are the relevant settings from my settings.py:
ALLOWED_HOSTS = [".replit.dev", ".replit.app"]
CSRF_TRUSTED_ORIGINS = [
"https://SomethingFrontend.replit.app",
"https://*.replit.dev", "https://*.replit.app"
]
CORS_ALLOWED_ORIGINS = [
"https://SomethingFrontend.replit.app"
]
CORS_ALLOW_CREDENTIALS = True
SESSION_COOKIE_SAMESITE = 'None'
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SAMESITE = 'None'
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_DOMAIN = ".replit.app"
CSRF_COOKIE_DOMAIN = ".replit.app"
I am also using django all-auth headless for social authentication via google and linkedIn
so
/r/django
https://redd.it/1j1jc4l
I do have decent experience in django but working first time on django+React, so couldn't get my head around this problem even after lot of research on internet.
I would be grateful if you guys can help me out on this one
So I have been trying to develop this Django + React app and deploy it on [repl.it](http://repl.it)
The URL for my hosted frontend is of form "SomethingFrontend.replit.app"
and for backend, it would be "SomethingBackend.replit.app"
below are the relevant settings from my settings.py:
ALLOWED_HOSTS = [".replit.dev", ".replit.app"]
CSRF_TRUSTED_ORIGINS = [
"https://SomethingFrontend.replit.app",
"https://*.replit.dev", "https://*.replit.app"
]
CORS_ALLOWED_ORIGINS = [
"https://SomethingFrontend.replit.app"
]
CORS_ALLOW_CREDENTIALS = True
SESSION_COOKIE_SAMESITE = 'None'
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SAMESITE = 'None'
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_DOMAIN = ".replit.app"
CSRF_COOKIE_DOMAIN = ".replit.app"
I am also using django all-auth headless for social authentication via google and linkedIn
so
/r/django
https://redd.it/1j1jc4l
Replit
Replit – Build apps and sites with AI
Replit is an AI-powered platform for building professional web apps and websites.
TIL you can use else with a while loop
Not sure why I’ve never heard about this, but apparently you can use else with a while loop. I’ve always used a separate flag variable
This will execute when the while condition is false but not if you break out of the loop early.
For example:
Using flag
Using else
/r/Python
https://redd.it/1j1axht
Not sure why I’ve never heard about this, but apparently you can use else with a while loop. I’ve always used a separate flag variable
This will execute when the while condition is false but not if you break out of the loop early.
For example:
Using flag
nums = [1, 3, 5, 7, 9]
target = 4
found = False
i = 0
while i < len(nums):
if nums[i] == target:
found = True
print("Found:", target)
break
i += 1
if not found:
print("Not found")
Using else
nums = [1, 3, 5, 7, 9]
target = 4
i = 0
while i < len(nums):
if nums[i] == target:
print("Found:", target)
break
i += 1
else:
print("Not found")
/r/Python
https://redd.it/1j1axht
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
What algorithm does math.factorial use?
Does math.factorial(n) simply multiply 1x2x3x4…n ? Or is there some other super fast algorithm I am not aware of? I am trying to write my own fast factorial algorithm and what to know it’s been done
/r/Python
https://redd.it/1j1r2j7
Does math.factorial(n) simply multiply 1x2x3x4…n ? Or is there some other super fast algorithm I am not aware of? I am trying to write my own fast factorial algorithm and what to know it’s been done
/r/Python
https://redd.it/1j1r2j7
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
I Built a Localization Helper Tool for Localizers/Translators
Hey everyone,
Last month, while localizing a game update, I found it frustrating to track which keys still needed translation. I tried using various AI tools and online services with massive token pools, but nothing quite fit my workflow.
So, I decided to build my own program, a Localization Helper Tool!
What My Project Does: This app detects missing translation keys after a game update and displays each missing key. I also added an auto-machine translation feature, but most won't need that, I assume (you still need a Google Cloud API key for that).
Target Audience: This tool is primarily for game developers and translators who work with localization files and need to quickly identify missing translations after updates.
Comparison: Unlike general translation services or complex localization platforms, my tool specifically focuses on detecting missing keys between versions. Most existing solutions I found were either too complex (full localization suites) or too basic (simple text comparison tools). My tool bridges this gap.
It's my first app, and I've made it with the help of GitHub Copilot, so I don't know if the file structure and code lengths for each file are good or not, but nevertheless, it works as it should.
I'd love to hear your thoughts
/r/Python
https://redd.it/1j1s5zt
Hey everyone,
Last month, while localizing a game update, I found it frustrating to track which keys still needed translation. I tried using various AI tools and online services with massive token pools, but nothing quite fit my workflow.
So, I decided to build my own program, a Localization Helper Tool!
What My Project Does: This app detects missing translation keys after a game update and displays each missing key. I also added an auto-machine translation feature, but most won't need that, I assume (you still need a Google Cloud API key for that).
Target Audience: This tool is primarily for game developers and translators who work with localization files and need to quickly identify missing translations after updates.
Comparison: Unlike general translation services or complex localization platforms, my tool specifically focuses on detecting missing keys between versions. Most existing solutions I found were either too complex (full localization suites) or too basic (simple text comparison tools). My tool bridges this gap.
It's my first app, and I've made it with the help of GitHub Copilot, so I don't know if the file structure and code lengths for each file are good or not, but nevertheless, it works as it should.
I'd love to hear your thoughts
/r/Python
https://redd.it/1j1s5zt
Reddit
From the Python community on Reddit: I Built a Localization Helper Tool for Localizers/Translators
Explore this post and more from the Python community
Visualizating All of Python
What My Project Does: I built a visualization of the packages in PyPi here, and found it pretty fun for discovering packages. For the source and reproducing it, see here. Hope you get a kick out of it, too!
Target Audience: Python Devs
Comparison: I didn't find anything like it out there, although I'm sure there must be something like it out there.
/r/Python
https://redd.it/1j1vpng
What My Project Does: I built a visualization of the packages in PyPi here, and found it pretty fun for discovering packages. For the source and reproducing it, see here. Hope you get a kick out of it, too!
Target Audience: Python Devs
Comparison: I didn't find anything like it out there, although I'm sure there must be something like it out there.
/r/Python
https://redd.it/1j1vpng
fi-le.net
fi-le.net, the Fiefdom of Files
Making image text unrecognizable to ocr with python.
Hello, I am a python learner. I was playing around with image manipulation techniques using cv2, pil, numpy etc similar. I was aiming to make an image that contains a text becomes unrecognizable by an OCR or ai image to text apps. I was wondering what techniques i could use to achieve this. I dont want to specifically corrupt just the image but want it to be manipulated such that human eye thinks its normal but ocr or ai thinks wtf is that idk. So what techniques can i use to achieve such a result that even if i paste that image somewhere or someone screenshots the image and puts in ocr, they cant extract text from it?
thanks :)
/r/Python
https://redd.it/1j206j0
Hello, I am a python learner. I was playing around with image manipulation techniques using cv2, pil, numpy etc similar. I was aiming to make an image that contains a text becomes unrecognizable by an OCR or ai image to text apps. I was wondering what techniques i could use to achieve this. I dont want to specifically corrupt just the image but want it to be manipulated such that human eye thinks its normal but ocr or ai thinks wtf is that idk. So what techniques can i use to achieve such a result that even if i paste that image somewhere or someone screenshots the image and puts in ocr, they cant extract text from it?
thanks :)
/r/Python
https://redd.it/1j206j0
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
How do I install tailwind version 4 with flask?
I found a lot of older versions that tell you how to setup tailwind. Will they work with tailwind version 4?
If not does anyone know how?
Also I am using blueprints in my flask app if that makes a difference.
Here is an example of something I found https://www.codewithharry.com/blogpost/using-tailwind-with-flask/
/r/flask
https://redd.it/1j1gr19
I found a lot of older versions that tell you how to setup tailwind. Will they work with tailwind version 4?
If not does anyone know how?
Also I am using blueprints in my flask app if that makes a difference.
Here is an example of something I found https://www.codewithharry.com/blogpost/using-tailwind-with-flask/
/r/flask
https://redd.it/1j1gr19
CodeWithHarry
CodeWithHarry - Learn Programming and Coding
Learn programming with easy-to-follow tutorials, courses, and resources. CodeWithHarry offers free content for beginners and advanced developers.
Django In Production Having Too Many Open Files
I have one VPS thats running about 5 Django servers behind nginx. All are using gunicorn and are somewhat complex. Celery tasks and management commands running on cron.
But i have one of them that is causing a huge problem.
Errno 24 Too many open files: 'myfile.pickle'
and
could not translate host name "my-rds-server-hostname"
When i run this one server the number of handles open when running
lsof | wc -l
Is 62,000 files / handles. When i kill this one gunicorn server, it goes down to 600 open files / handles.
I have no idea what could be causing this many open handles in this one server process. Each other gunicorn has a few hundred but this one has like 59,000 just by itself. These files are opened the SECOND the server starts so its not some kind of long term leak.
I was thinking maybe a stray import or something but no.
Cpu usage is like 4% for this one process and ram is only about 20% full for the entire system.
The hostname issue is intermittent but only happens when the other issue happens. It is not internet issues or something like that. It just seems
/r/django
https://redd.it/1j1zqet
I have one VPS thats running about 5 Django servers behind nginx. All are using gunicorn and are somewhat complex. Celery tasks and management commands running on cron.
But i have one of them that is causing a huge problem.
Errno 24 Too many open files: 'myfile.pickle'
and
could not translate host name "my-rds-server-hostname"
When i run this one server the number of handles open when running
lsof | wc -l
Is 62,000 files / handles. When i kill this one gunicorn server, it goes down to 600 open files / handles.
I have no idea what could be causing this many open handles in this one server process. Each other gunicorn has a few hundred but this one has like 59,000 just by itself. These files are opened the SECOND the server starts so its not some kind of long term leak.
I was thinking maybe a stray import or something but no.
Cpu usage is like 4% for this one process and ram is only about 20% full for the entire system.
The hostname issue is intermittent but only happens when the other issue happens. It is not internet issues or something like that. It just seems
/r/django
https://redd.it/1j1zqet
Reddit
From the django community on Reddit
Explore this post and more from the django community
Few years as a Django Developer but Still Feel Underqualified — Need Advice to gain Confidence
Hi everyone,
I have few years of experience as a Python Django developer, working from home since day one. I'm currently trying to switch jobs, but I feel like I don't know enough Django or I don't have enough confidence in it.
During this time, I've learned many things other than just django. I haven't built enough personal projects to showcase my skills. Whenever I try to build something, I end up relying heavily on ChatGPT — although I understand what the code does and why it's written that way. Most of my learning has come from YouTube tutorials, and I'm a quick learner, but I struggle with consistency.
One day I'm learning React, the next day something new, and by the end of the week, I'm exploring something entirely different. I feel like I'm all over the place and not mastering anything.
Is this common among self-taught developers? How can I gain real confidence in Django? Should I stick to a structured resource like a book or course? If yes, could you recommend one?
Any advice or personal experiences would be really helpful. Thank you!
/r/django
https://redd.it/1j1w4ca
Hi everyone,
I have few years of experience as a Python Django developer, working from home since day one. I'm currently trying to switch jobs, but I feel like I don't know enough Django or I don't have enough confidence in it.
During this time, I've learned many things other than just django. I haven't built enough personal projects to showcase my skills. Whenever I try to build something, I end up relying heavily on ChatGPT — although I understand what the code does and why it's written that way. Most of my learning has come from YouTube tutorials, and I'm a quick learner, but I struggle with consistency.
One day I'm learning React, the next day something new, and by the end of the week, I'm exploring something entirely different. I feel like I'm all over the place and not mastering anything.
Is this common among self-taught developers? How can I gain real confidence in Django? Should I stick to a structured resource like a book or course? If yes, could you recommend one?
Any advice or personal experiences would be really helpful. Thank you!
/r/django
https://redd.it/1j1w4ca
Reddit
From the django community on Reddit
Explore this post and more from the django community
Use DjangoModelFormMutation to update instance in Graphene-Django
Hello,
I am currently trying out graphql in my Django application. I have installed Graphene Django and tried out the first things. Now I want to implement the CRUD operations for my model as simply as possible.
I found in the documentation that you can use the Django Forms for the mutations. So for my model I have
class Category(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=255)
language = models.ForeignKey('company.Language', on_delete=models.CASCADE)
i have created a form:
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
fields = ('name', 'language',)
And now I use this mutation
class CategoryMutation(DjangoModelFormMutation):
category = graphene.Field(CategoryType)
class Meta:
form_class = CategoryForm
class Mutation(graphene.ObjectType):
create_category = CategoryMutation.Field()
The creation with the following graphql
/r/django
https://redd.it/1j1o5za
Hello,
I am currently trying out graphql in my Django application. I have installed Graphene Django and tried out the first things. Now I want to implement the CRUD operations for my model as simply as possible.
I found in the documentation that you can use the Django Forms for the mutations. So for my model I have
class Category(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=255)
language = models.ForeignKey('company.Language', on_delete=models.CASCADE)
i have created a form:
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
fields = ('name', 'language',)
And now I use this mutation
class CategoryMutation(DjangoModelFormMutation):
category = graphene.Field(CategoryType)
class Meta:
form_class = CategoryForm
class Mutation(graphene.ObjectType):
create_category = CategoryMutation.Field()
The creation with the following graphql
/r/django
https://redd.it/1j1o5za
Reddit
From the django community on Reddit
Explore this post and more from the django community
Need Advise for deploying workers
Our client is currently using Render as a hosting service for the Django web app, 2 worker instances, one db instance and one redis instance. The client has a local server that they use for backups and store some information on site. I was thinking about moving the two workers and the redis instance to the NAS and connect them to the main server and the db.
From a cybersecurity perspective, I know it would be better to keep everything on Render, but the workers handle non-essential tasks and non-confidential information; so my take is that this could be done without severely compromising information for the client and reducing the montly costs on Render. I would obviously configure the NAS and the db so they only accept connections from one another and the NAS has decent cybersecurity protocols according to the client.
Am I missing something? Does anyone have any other suggestions?
/r/django
https://redd.it/1j2b9pw
Our client is currently using Render as a hosting service for the Django web app, 2 worker instances, one db instance and one redis instance. The client has a local server that they use for backups and store some information on site. I was thinking about moving the two workers and the redis instance to the NAS and connect them to the main server and the db.
From a cybersecurity perspective, I know it would be better to keep everything on Render, but the workers handle non-essential tasks and non-confidential information; so my take is that this could be done without severely compromising information for the client and reducing the montly costs on Render. I would obviously configure the NAS and the db so they only accept connections from one another and the NAS has decent cybersecurity protocols according to the client.
Am I missing something? Does anyone have any other suggestions?
/r/django
https://redd.it/1j2b9pw
Reddit
From the django community on Reddit
Explore this post and more from the django community
Need Help deploying a backend flask and front end react website
this is the repo https://github.com/HarshiniDonepudi/wound-app-vite
/r/flask
https://redd.it/1j28zgd
this is the repo https://github.com/HarshiniDonepudi/wound-app-vite
/r/flask
https://redd.it/1j28zgd
GitHub
GitHub - HarshiniDonepudi/wound-app-vite
Contribute to HarshiniDonepudi/wound-app-vite development by creating an account on GitHub.
D Self-Promotion Thread
Please post your personal projects, startups, product placements, collaboration needs, blogs etc.
Please mention the payment and pricing requirements for products and services.
Please do not post link shorteners, link aggregator websites , or auto-subscribe links.
\--
Any abuse of trust will lead to bans.
Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
\--
Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.
/r/MachineLearning
https://redd.it/1j1hc0o
Please post your personal projects, startups, product placements, collaboration needs, blogs etc.
Please mention the payment and pricing requirements for products and services.
Please do not post link shorteners, link aggregator websites , or auto-subscribe links.
\--
Any abuse of trust will lead to bans.
Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
\--
Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.
/r/MachineLearning
https://redd.it/1j1hc0o
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community