Deploy Django to DigitalOcean Kubernetes
https://youtu.be/-md_6nmogNc
/r/django
https://redd.it/1gir6he
https://youtu.be/-md_6nmogNc
/r/django
https://redd.it/1gir6he
YouTube
Deploy Django to DigitalOcean Kubernetes
How to deploy a Django Celery project to DigitalOcean Kubernetes for a production grade environment.
Get $200 of free DigitalOcean credits https://bit.ly/3UzTEcU
Repos
https://github.com/doherty-labs/django-rest-api
https://github.com/doherty-labs/terraform…
Get $200 of free DigitalOcean credits https://bit.ly/3UzTEcU
Repos
https://github.com/doherty-labs/django-rest-api
https://github.com/doherty-labs/terraform…
Monday Daily Thread: Project ideas!
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1gj14rr
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1gj14rr
YouTube
Build & Integrate your own custom chatbot to a website (Python & JavaScript)
In this fun project you learn how to build a custom chatbot in Python and then integrate this to a website using Flask and JavaScript.
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Build a Secure Transaction System with Django Rest Framework (DRF) - Step-by-Step Guide
https://youtu.be/81k2pj436wA
/r/djangolearning
https://redd.it/1gi8393
https://youtu.be/81k2pj436wA
/r/djangolearning
https://redd.it/1gi8393
YouTube
Build a Secure Transaction System with Django Rest Framework (DRF) - Step-by-Step Guide
Learn how to build a secure and efficient transaction system API with Django Rest Framework (DRF) in this comprehensive end-to-end project tutorial. Follow along as we cover everything from database models and API endpoints to security measures, payment integrations…
I am trying to create multiple forms with a max_entries = to the number of usernames in the db. I realize it would probably be simpler with javascript the problem is I don't know any javascript. What would be the best way to do this using fieldList?
How do I create multiple forms with a max\_entries = to the number of usernames in the db? Here is the code I am basing this on [https://prettyprinted.com/tutorials/how-to-use-fieldlist-in-flask-wtf/](https://prettyprinted.com/tutorials/how-to-use-fieldlist-in-flask-wtf/) I tried this version in [app.py](http://app.py)
Also I just want one of the forms filled out at a time.
class UsernameForms(FlaskForm):
usernames = FieldList(FormField(CreateUserForm), min_entries=0, max_entries=0)
I also tried this example with not having `max_entries` in [app.py](http://app.py)
class UsernameForms(FlaskForm):
usernames = FieldList(FormField(CreateUserForm), min_entries=0)
I got the above idea from chatgpt so I am not sure if it will even work.
Here is a simple working example.
Here is my example [app.py](http://app.py)
[https://pastebin.com/FSfjgDch](https://pastebin.com/FSfjgDch)
Also when I try to go `flash(number_of_usernames_in_db) I get 5 so that can't be the problem.`
Here is the templates folder content which contains the html files.
[https://pastebin.com/cmvvn28J](https://pastebin.com/cmvvn28J)
Here is requirements.txt.
blinker==1.8.2
click==8.1.7
colorama==0.4.6
Flask==3.0.3
Flask-Breadcrumbs==0.5.1
Flask-Login==0.6.3
flask-menu==1.0.1
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.2
greenlet==3.1.1
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==3.0.2
six==1.16.0
/r/flask
https://redd.it/1gj3tgl
How do I create multiple forms with a max\_entries = to the number of usernames in the db? Here is the code I am basing this on [https://prettyprinted.com/tutorials/how-to-use-fieldlist-in-flask-wtf/](https://prettyprinted.com/tutorials/how-to-use-fieldlist-in-flask-wtf/) I tried this version in [app.py](http://app.py)
Also I just want one of the forms filled out at a time.
class UsernameForms(FlaskForm):
usernames = FieldList(FormField(CreateUserForm), min_entries=0, max_entries=0)
I also tried this example with not having `max_entries` in [app.py](http://app.py)
class UsernameForms(FlaskForm):
usernames = FieldList(FormField(CreateUserForm), min_entries=0)
I got the above idea from chatgpt so I am not sure if it will even work.
Here is a simple working example.
Here is my example [app.py](http://app.py)
[https://pastebin.com/FSfjgDch](https://pastebin.com/FSfjgDch)
Also when I try to go `flash(number_of_usernames_in_db) I get 5 so that can't be the problem.`
Here is the templates folder content which contains the html files.
[https://pastebin.com/cmvvn28J](https://pastebin.com/cmvvn28J)
Here is requirements.txt.
blinker==1.8.2
click==8.1.7
colorama==0.4.6
Flask==3.0.3
Flask-Breadcrumbs==0.5.1
Flask-Login==0.6.3
flask-menu==1.0.1
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.2
greenlet==3.1.1
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==3.0.2
six==1.16.0
/r/flask
https://redd.it/1gj3tgl
Prettyprinted
How to Use FieldList in Flask-WTF
Learn how to use the FieldList class in Flask-WTF so you can how repeated copies of a nested form
in a larger form.
in a larger form.
Python Threading Tutorial: Basic to Advanced (Multithreading, Pool Executors, Daemon, Lock, Events)
Are you trying to make your code run faster? In this video, we will be taking a deep dive into python threads from basic to advanced concepts so that you can take advantage of parallelism and concurrency to speed up your program.
- Python Thread without join()
- Python Thread with join()
- Python Thread with Input Arguments
- Python Multithreading
- Python Daemon Threads
- Python Thread with Synchronization using Locks
- Python Thread Queue Communication between Threads
- Python Thread Pool Executor
- Python Thread Events
- Speed Comparison I/O Task
- Speed Comparison CPU Task (Multithreading vs Multiprocessing)
https://youtu.be/Rm9Pic2rpAQ
/r/Python
https://redd.it/1gj177a
Are you trying to make your code run faster? In this video, we will be taking a deep dive into python threads from basic to advanced concepts so that you can take advantage of parallelism and concurrency to speed up your program.
- Python Thread without join()
- Python Thread with join()
- Python Thread with Input Arguments
- Python Multithreading
- Python Daemon Threads
- Python Thread with Synchronization using Locks
- Python Thread Queue Communication between Threads
- Python Thread Pool Executor
- Python Thread Events
- Speed Comparison I/O Task
- Speed Comparison CPU Task (Multithreading vs Multiprocessing)
https://youtu.be/Rm9Pic2rpAQ
/r/Python
https://redd.it/1gj177a
YouTube
Python Threading Tutorial: Basic to Advanced (Multithreading, Pool Executors, Daemon, Lock, Events)
Are you trying to make your code run faster? In this video, we will be taking a deep dive into python threads from basic to advanced concepts so that you can take advantage of parallelism and concurrency to speed up your program.
0:00 Introduction
0:53…
0:00 Introduction
0:53…
Flask, Gunicorn, multiprocessing under the hood. Optimal number of workers?
I'm in the process of configuring my flask app, trying to find the optimal configuration for our use case.
We had a slow endpoint on our API, but with the implementation of multiprocessing we've managed to roughly 10x the performance of that particular task such that the speed is acceptable.
I deploy the image on a VM with 16 cores.
The multiprocessing uses all 16 cores.
The gunicorn documentation seems to recommend a configuration of (2*num_cores) + 1 workers.
I tried this configuration, but it seems to make the machine fall over. Is this becase multiple workers trying to access all the cores at the same time is a disaster?
The optimal configuration for my app seems to be simply 1 gunicorn worker. Then it has sole access to the 16 cores, and it can complete requests in a good amount of time and then move onto the next request.
Does this sound normal / expected?
I deploy to Azure and the error I kept seeing until I reduced the number of workers was something like 'rate limit: too many requests' even though it was only 10 simultaneous requests.
(on second thought, I think this rate limit is hitting a memory limit. When 2 requests come in, and attempt
/r/flask
https://redd.it/1gio20q
I'm in the process of configuring my flask app, trying to find the optimal configuration for our use case.
We had a slow endpoint on our API, but with the implementation of multiprocessing we've managed to roughly 10x the performance of that particular task such that the speed is acceptable.
I deploy the image on a VM with 16 cores.
The multiprocessing uses all 16 cores.
The gunicorn documentation seems to recommend a configuration of (2*num_cores) + 1 workers.
I tried this configuration, but it seems to make the machine fall over. Is this becase multiple workers trying to access all the cores at the same time is a disaster?
The optimal configuration for my app seems to be simply 1 gunicorn worker. Then it has sole access to the 16 cores, and it can complete requests in a good amount of time and then move onto the next request.
Does this sound normal / expected?
I deploy to Azure and the error I kept seeing until I reduced the number of workers was something like 'rate limit: too many requests' even though it was only 10 simultaneous requests.
(on second thought, I think this rate limit is hitting a memory limit. When 2 requests come in, and attempt
/r/flask
https://redd.it/1gio20q
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Why Django
Why would you pick Django over other similar frameworks such Laravel, Ruby on Rails, Phoenix, Adonis, etc?
I hear lots of people say Django very rarely has breaking changes - do you stand by that?
/r/django
https://redd.it/1gj46hc
Why would you pick Django over other similar frameworks such Laravel, Ruby on Rails, Phoenix, Adonis, etc?
I hear lots of people say Django very rarely has breaking changes - do you stand by that?
/r/django
https://redd.it/1gj46hc
Reddit
From the django community on Reddit
Explore this post and more from the django community
Looking for Data Science Enthusiast
Hey everyone! I'm looking to connect with fellow enthusiasts in AI/ML and Data Science. I'm passionate about sharing knowledge and collaborating on projects. If you're working on something interesting. I'd love to hear from you!
/r/flask
https://redd.it/1gic3gu
Hey everyone! I'm looking to connect with fellow enthusiasts in AI/ML and Data Science. I'm passionate about sharing knowledge and collaborating on projects. If you're working on something interesting. I'd love to hear from you!
/r/flask
https://redd.it/1gic3gu
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
New Deep Learning Framework; Zephyr is on early release; active development
What My Project Does
It is deep learning library / framework on top of JAX. Zephyr was motivated by an inclination to writing FP because JAX was FP. Zephyr reflects the nature of networks and layers, they are simply mathematical functions. By reflecting this, you are able to write code quicker and easier with minimal learning curve.
Target Audience
This framework is not ready for production nor general use. It is in active development and if you do use it, I highly appreciate it and so if you submit reports or requests, I will tend to them immediately.
It is for people who would like to use JAX in an FP way.
Comparison
Within JAX: Flax, Haiku, and Equinox are your options; within python you additionally have Tensorflow and PyTorch. All of which are OO. In contrast, Zephyr is FP and you write nets and layers as functions.
OO - FP: Because zephyr is FP, it looks similar to math and it enjoys shorter code because there is no 1) initialize the module 2) call/forward/apply the module. There are only function calls. FP is more explicit tho
Here is a short example. (Some variables are not specified for brevity). README for more.
Example: Linear Layer Only
Other
/r/Python
https://redd.it/1gjdq6y
What My Project Does
It is deep learning library / framework on top of JAX. Zephyr was motivated by an inclination to writing FP because JAX was FP. Zephyr reflects the nature of networks and layers, they are simply mathematical functions. By reflecting this, you are able to write code quicker and easier with minimal learning curve.
Target Audience
This framework is not ready for production nor general use. It is in active development and if you do use it, I highly appreciate it and so if you submit reports or requests, I will tend to them immediately.
It is for people who would like to use JAX in an FP way.
Comparison
Within JAX: Flax, Haiku, and Equinox are your options; within python you additionally have Tensorflow and PyTorch. All of which are OO. In contrast, Zephyr is FP and you write nets and layers as functions.
OO - FP: Because zephyr is FP, it looks similar to math and it enjoys shorter code because there is no 1) initialize the module 2) call/forward/apply the module. There are only function calls. FP is more explicit tho
Here is a short example. (Some variables are not specified for brevity). README for more.
Example: Linear Layer Only
Other
/r/Python
https://redd.it/1gjdq6y
GitHub
GitHub - mzguntalan/zephyr: Zephyr is a declarative neural network library on top of JAX allowing for easy and fast neural network…
Zephyr is a declarative neural network library on top of JAX allowing for easy and fast neural network designing, creation, and manipulation - mzguntalan/zephyr
Replacing CharField with ForeignKey
In my model
Meanwhile, the application has grown and I have to gerneralize the
I have established the model
A migration is necessary to keep the data.
/r/djangolearning
https://redd.it/1ght39y
In my model
Event, I have the following field defined:
event_type = models.CharField('Kursart', max_length=20, choices=EVENT_TYPE_ALL, default=ALLGEMEIN)
Meanwhile, the application has grown and I have to gerneralize the
event_type. The optimal solution would be a ForeignKey to a model EventType holding attributes currently also part of Event.I have established the model
EventType. Now I wonder, how do I migrate the CharField to the ForeignKey? makemigrations and migrate doesn't work (obviously) because names, datastructures (ie. everything) has changed.A migration is necessary to keep the data.
/r/djangolearning
https://redd.it/1ght39y
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
D Simple Questions Thread
Please post your questions here instead of creating a new thread. 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.
Thanks to everyone for answering questions in the previous thread!
/r/MachineLearning
https://redd.it/1giq4ia
Please post your questions here instead of creating a new thread. 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.
Thanks to everyone for answering questions in the previous thread!
/r/MachineLearning
https://redd.it/1giq4ia
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Learning Django
What do you think is the best way to go for learning django and what else should I learn with it
/r/djangolearning
https://redd.it/1gjmv6f
What do you think is the best way to go for learning django and what else should I learn with it
/r/djangolearning
https://redd.it/1gjmv6f
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
How did you get your first Django job?
Hi folks
My journey started on a job posting on social media about Someone asks about Django developer before that i got a lot of rejection before interview because of lack of experience back then
We had a good interview and they gave me a task to add to their project and i did that correctly and that's how i got my first job as a DJANGO developer
/r/django
https://redd.it/1gjhg7x
Hi folks
My journey started on a job posting on social media about Someone asks about Django developer before that i got a lot of rejection before interview because of lack of experience back then
We had a good interview and they gave me a task to add to their project and i did that correctly and that's how i got my first job as a DJANGO developer
/r/django
https://redd.it/1gjhg7x
Reddit
From the django community on Reddit
Explore this post and more from the django community
Django Learning
What do you think is the best way to go for learning django and what else should I learn with it
/r/django
https://redd.it/1gjmvkx
What do you think is the best way to go for learning django and what else should I learn with it
/r/django
https://redd.it/1gjmvkx
Reddit
From the django community on Reddit
Explore this post and more from the django community
What problems do Large Language Models (LLMs) actually solve very well? D
While there's growing skepticism about the AI hype cycle, particularly around chatbots and RAG systems, I'm interested in identifying specific problems where LLMs demonstrably outperform traditional methods in terms of accuracy, cost, or efficiency. Problems I can think of are:
\- words categorization
\- sentiment analysis of no-large body of text
\- image recognition (to some extent)
\- writing style transfer (to some extent)
what else?
/r/MachineLearning
https://redd.it/1gjoxpi
While there's growing skepticism about the AI hype cycle, particularly around chatbots and RAG systems, I'm interested in identifying specific problems where LLMs demonstrably outperform traditional methods in terms of accuracy, cost, or efficiency. Problems I can think of are:
\- words categorization
\- sentiment analysis of no-large body of text
\- image recognition (to some extent)
\- writing style transfer (to some extent)
what else?
/r/MachineLearning
https://redd.it/1gjoxpi
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
How do you manage email signups & newsletters in Django?
Hi all,
I've built a lot with Django but never found a satisfactory way to manage my email signups and sending newsletters. So far I've been working with a
Have you found a better way?
/r/django
https://redd.it/1gje7jj
Hi all,
I've built a lot with Django but never found a satisfactory way to manage my email signups and sending newsletters. So far I've been working with a
Newsletter model and then crafting emails by hand - ugly!Have you found a better way?
/r/django
https://redd.it/1gje7jj
Reddit
From the django community on Reddit
Explore this post and more from the django community
Component sources
Are there any sources for making templates that can act like components?
Sort of how react libraries have material where they have docs on how to use their “select” widget
Is there any source like that for Django otherwise I have to make my own custom stuff
/r/django
https://redd.it/1gjx43h
Are there any sources for making templates that can act like components?
Sort of how react libraries have material where they have docs on how to use their “select” widget
Is there any source like that for Django otherwise I have to make my own custom stuff
/r/django
https://redd.it/1gjx43h
Reddit
From the django community on Reddit
Explore this post and more from the django community
Page not found (404)
So today I started learning django from the official documentations, I am following the tutorials they offer, so I tried running the code after following the tutorial but it does not run, what did do that caused this? Here is the screenshot of the project:
https://preview.redd.it/04bxbnz5qfyd1.png?width=1915&format=png&auto=webp&s=311ef7ffd4dc83775eccf2724c111f57fe8a4ae5
The page:
https://preview.redd.it/nika8u7fqfyd1.png?width=1367&format=png&auto=webp&s=b040fadf09c64fad3d22ec51f97bf74f3b96894e
https://preview.redd.it/qegr5v7fqfyd1.png?width=1367&format=png&auto=webp&s=68914639409635af9983922642836087d6fd1f2a
/r/djangolearning
https://redd.it/1ghqogu
So today I started learning django from the official documentations, I am following the tutorials they offer, so I tried running the code after following the tutorial but it does not run, what did do that caused this? Here is the screenshot of the project:
https://preview.redd.it/04bxbnz5qfyd1.png?width=1915&format=png&auto=webp&s=311ef7ffd4dc83775eccf2724c111f57fe8a4ae5
The page:
https://preview.redd.it/nika8u7fqfyd1.png?width=1367&format=png&auto=webp&s=b040fadf09c64fad3d22ec51f97bf74f3b96894e
https://preview.redd.it/qegr5v7fqfyd1.png?width=1367&format=png&auto=webp&s=68914639409635af9983922642836087d6fd1f2a
/r/djangolearning
https://redd.it/1ghqogu
Django Project
Writing your first Django app, part 1 | Django documentation
The web framework for perfectionists with deadlines.
Django bugfix release issued: 5.1.3
https://www.djangoproject.com/weblog/2024/nov/05/bugfix-release/
/r/django
https://redd.it/1gk09ri
https://www.djangoproject.com/weblog/2024/nov/05/bugfix-release/
/r/django
https://redd.it/1gk09ri
Django Project
Django bugfix release issued: 5.1.3
Posted by Mariusz Felisiak on Nov. 5, 2024