Questions & Answers
45
votes
1
answers
1854
views
How to add HTTPS to Django with Nginx
I need to enable HTTPS for my Django site. How do I configure SSL?
31
votes
1
answers
1803
views
How to implement Django file uploads
I need users to upload files. How do I handle file uploads in Django?
34
votes
1
answers
72
views
How to add search functionality to Django
I want to add a search feature to find articles by title or content.
47
votes
1
answers
842
views
How to implement Django user registration
I need to add user registration to my Django site. What is the best approach?
6
votes
1
answers
911
views
How to serve Django static files in production
My static files work in development but not in production. How do I fix this?
2
votes
1
answers
1536
views
How to create PostgreSQL database and user
I need to set up a new PostgreSQL database for my Django project.
45
votes
1
answers
1478
views
How to configure Celery with Django
I need to run background tasks in Django. How do I set up Celery?
31
votes
1
answers
1628
views
How to use Django signals
How can I run code automatically when a model is saved or deleted?
43
votes
1
answers
82
views
How to create Django forms
What is the difference between Form and ModelForm in Django?
27
votes
1
answers
1587
views
How to create Django model relationships
How do I create ForeignKey, OneToOne, and ManyToMany relationships?
35
votes
1
answers
393
views
How to create REST API with Django REST Framework
I want to build a REST API for my Django models. How do I use Django REST Framework?
41
votes
1
answers
1533
views
How to implement user authentication in Django
I need to add login, logout, and registration functionality to my Django app. What is the best approach?
23
votes
1
answers
1256
views
How to send emails in Django
I need to send email notifications from my Django app. How do I configure and send emails?
36
votes
1
answers
847
views
How to add pagination to Django views
I have a list view with hundreds of items. How do I add pagination to show only 10 items per page?
12
votes
1
answers
823
views
How to create custom Django management commands
I need to create a custom command that I can run with manage.py. How do I create one?
39
votes
1
answers
1732
views
CORS errors in Django REST API - complete fix
I'm getting CORS errors when my frontend tries to access my Django REST API. "Access-Control-Allow-Origin" header is missing.
22
votes
1
answers
72
views
How to optimize Django ORM queries for better performance
My Django application is slow. Database queries are taking forever. How can I optimize my ORM queries?
43
votes
1
answers
1516
views
PostgreSQL connection refused in Django - solutions
My Django app cannot connect to PostgreSQL. I get "connection refused" error. PostgreSQL is installed and running.
1
votes
1
answers
774
views
502 Bad Gateway with Nginx and Gunicorn - how to fix
I'm getting 502 Bad Gateway error when accessing my Django site through Nginx. Gunicorn seems to be running. How do I fix this?
40
votes
1
answers
1637
views
Django migrations not applying - troubleshooting guide
I made changes to my models but migrations are not being applied. makemigrations shows "No changes detected". What's wrong?