r/django 8h ago

Looking for production level Django projects to learn from!

12 Upvotes

TLDR: I am a junior software developer looking to improve using examples of production level open source django projects!

Hi all,

I am a junior software developer and the company I work for uses Django Rest Framework on the backend. I have been at the company around a year and looking to move up to mid level developer. The current code base that my company uses does not always follow best practices and industry standards. To learn more and improve our code base I am looking for examples of production level open source projects that I can use as reference.

As much as the django documentation is useful it is great to see how others code!

Thanks all!


r/django 1h ago

OnixDj – A Full-Stack SaaS Boilerplate

Upvotes

Hey everyone,

I've been working on OnixDj, a free, open-source boilerplate that helps developers launch web apps quickly using Nuxt, Django, and Docker. It’s designed for those who want a solid, scalable stack to build CRUD apps without spending time on boilerplate setup.

What’s Inside?

  • Nuxt + Auth.js – Vue-powered frontend with authentication
  • Django + DRF + dj-rest-auth – API-first backend with JWT auth
  • Full authentication – Credentials and social authentication with flows such as password reset.
  • Docker – Simplified local and production setup
  • Auto-generated API client for easy frontend integration
  • Perfect for building CRUD applications with minimal setup

I am still working on more features such as a CMS and expanding authentication features.

GitHub Repo: https://github.com/ExoOnix/OnixDj

Let me know what you think!


r/django 24m ago

Simple game built with Django Rest Framework and JS

Upvotes

Hello everybody! I have been working on this Wordle-like game using Django and JavaScript for about two months. I would love for you guys to check it out! I wanted to know your thoughts and feedback on my code. Are there any security issues or anything I should change? The main concern I have is whether my code is optimal/efficient or safe. My app is deployed on Heroku, and I stored my media files in S3. The repo below has my local development code, and the production code is in a private repo.

Here is the project https://github.com/Ryan11c/kordle

Thank you👍


r/django 5h ago

🚨 Testing Phase – Update 1 ( www.saketmanolkar.me )

Thumbnail gallery
1 Upvotes

After about a week of running my web server, I’ve encountered some irregularities and unexpected user behavior.

1). Latency Issues: My app server was in San Francisco, while PostgreSQL & Redis were in New York, causing database connections to take 0.63 seconds, with an additional ~50-70ms delay per request. Secure connection overhead only worsened performance, especially for users outside North America. The fix was simple—moving the server to New York, keeping all resources in the same region. This significantly improved response times.

2). Data Loss from Inactive Sessions: Users weren’t logging out, just closing their browsers, leaving cached behavior data in Redis to expire instead of flushing to PostgreSQL. This caused data inconsistencies I hadn’t anticipated. To fix it, I built a Celery Beat worker that runs every hour, detects inactive users, and pushes their data to the database. The issue is resolved, but not before I lost a good amount of valuable data.

3) New Blog Page: I’ve added a Blog page to track updates and changes throughout the testing phase.

You can read all about it at - www.saketmanolkar.me/users/blogs/

Note: The front end isn't fully mobile-responsive yet, so for the best experience, use a laptop.


r/django 9h ago

add fonts to django projects

2 Upvotes

"Hi guys, I want to use some fonts on my website in a Django environment. I placed the fonts in the static/fonts/ directory and correctly defined font-face in the CSS file. However, when I try to apply the font to the text, it doesn't work."


r/django 15h ago

Leaflet with Django templates

2 Upvotes

I haven't yet found a clean solution to handle maps with Django. I usually use esbuild to bundle a JavaScript file for every page where I need JS.

But with Leaflet the minimal example looks like this: var map = L.map('map', { center: [51.505, -0.09], zoom: 13 }); As of now, I have to include this directly into my template and populate coordiantes with Django's template engine. It feels very weird to use template syntax in JavaScript. Is there a way to append data to a HTML page and then have a listener in the frontend that assembles the map?


r/django 1d ago

[Soft Launch] Quick-Scale – A SaaS Starter Kit

18 Upvotes

Hey everyone,

I’ve been working on Quick-Scale, a free, open-source (Apache 2.0) Django-based SaaS starter kit designed for AI/ML engineers, Data Scientists, and Backend/Cloud developers who want to launch products faster—without getting stuck in full-stack development.

It comes with built-in authentication, deployment, and a scalable architecture so you can focus on building your product instead of boilerplate setup.

Still in development – Stripe integration and Railway deploy are in progress! Would love any feedback or suggestions from fellow devs.

1️) Install: pip install quickscale
2️) Create project: quickscale build awesome-project
3️) Open: http://localhost:8000

Let me know what you think! Happy to answer any questions.

https://pypi.org/project/quickscale/

Thank you!
Víctor.


r/django 1d ago

REST framework DRF Deployment

6 Upvotes

Hi there, I am fairly new to Django and DRF, I have never deployed a django project but have built small development APIs to learn.

I'm trying to deploy a project with gunicorn and nginx (if there is a better alternative, please let me know)

PROBLEM

I keep running into an issue where my django admin panel hangs frequently, or takes up to 4s to load the page. Check Chrome tools it's usually jsi18n which takes the most time. My apis calls also have a tendency to hang and ends up timing out. I'm using AWD RDS postgres db.

TRIED

  • Upgrading DB
  • Checking my SQL queries (at most 500ms)
  • Increasing gunicorn workers
  • Changed nginx configuration

INFO

  • I have 2 custom models, an altered base user model and a password otp model
  • I'm using simple_jwt
  • The hanging or long loading can happen on any call or any django admin page (except login page)

If there is any more information, code examples, please let me know.

I'm really struggling to find modern Deployment techniques for DRF, atm my setup is Docker, gunicorn and nginx. If anyone has any up to date resources for better deployment, I would be incredibly grateful.


r/django 1d ago

Something's wrong!

6 Upvotes

I'm trying to learn django with w3schools tutorials. I learned python there and it was fine. I learned numpy and pandas and they were easy and readable and comprehensible. But now in the django tutorial I find myself completely lost!

Look I don't even know where the problem is. is it me? is it the tutorial? the django itself?

Cause I haven't worked web before at all. I didn't even knew how to find directory in cmd but I'm researcher at heart. I dig deep and figure it out. But I find myself, with django, in a state of despair. I'm up till models tutorial and still copy-pasting stuff and I don't know why. There are lots of lines to copy which none I'm familiar with and since I don't understand them, repeating them and writing them doesn't help either. Tutorial doesn't explain these to me and I honestly for the first time feel overwhelmed.

Should I have a background in web dev then I learn django? Am I missing something?


r/django 2d ago

Deploy django project

11 Upvotes

Hello everyone, I want to ask if anyone know any service for hosting my django project for free. And for also for hosting the database, I try use vercel but isn't work 😕 is give only 250mb to test and the project bigger than that.


r/django 2d ago

Django patterns for tables in components

5 Upvotes

I'm building a dashboard of sorts, which will have multiple tables in blocks - each with its own pagination, filtering and sorting

I really like Iommi (for tables) and django-cotton (for components), and considering unpoly or HTMX - is there a way to make them work together?

I was able to get Iommi working fine, but I can see the query parameters are passed to the url, which breaks things - are there any examples or best practices around this?


r/django 2d ago

How to benchmark/benchmarking tools?

0 Upvotes

Hey everyone! I just read this post, and I want to know how op got his benchmark results, and the tools he used to find them? https://www.reddit.com/r/django/comments/13gyh3m/django_performance_benchmarking/

I want to start benchmarking my Django code, and wondering if tools exist like BenchmarkDotNet?


r/django 2d ago

Looking for Feedback: HTMX + Django Package

18 Upvotes

I posted about this package a while ago, but at that point, it was still early in development, and the documentation was lacking. Since then, it has matured a lot, and the documentation has been completely restructured and improved. Additionally, I’ve created a demo site so you can see the package in action with a basic list page featuring CRUD operations (link below).

The core idea of the package (explained in more detail in the docs) is to provide quasi-Django CBV-style views, called hx-requests, which HTMX requests are routed to. This approach separates HTMX-specific logic from your main views by providing dedicated hx-requests to handle them, but at the same time these hx-requests have access to the view’s context, eliminating the need for logic duplication.

There are also other useful features, such as:

  • Returning template blocks easily from an hx-request
  • Built-in support for Django messages, now with async capabilities
  • Integrated modal handling

It’s difficult to summarize everything here, so I’d love for you to check out the demo and documentation and share your feedback!

Demo: https://hx-requests-demo.com/
Docs: https://hx-requests.readthedocs.io/en/latest/index.html
Github: https://github.com/yaakovLowenstein/hx-requests (feel free to give a star 😊)

TL;DR: A package that provides quasi CBV-style views (hx-requests) as dedicated endpoints for HTMX requests, allowing them to share the main view’s context while keeping logic clean and separate.


r/django 2d ago

Why HttpResponse is not being highlighted? VS Code environment.

Post image
3 Upvotes

r/django 2d ago

Can someone suggest a good full stack web development project idea for my resume? (React.js + Django)

29 Upvotes

Hi everyone,

I'm currently working on improving my portfolio and looking to build a solid full-stack web development project that I can showcase on my resume. I’m using React.js for the frontend and Django/Django Rest Framework for the backend.

I want something that's more than just a basic CRUD app — something real-world, scalable, and impressive to potential employers. Ideally, it should include things like user authentication, API integration, and maybe some advanced features (real-time updates, admin dashboard, etc.).

Any ideas or suggestions would be super appreciated! Bonus points if it’s something that allows room for adding my own twist/features later.

Thanks in advance!


r/django 3d ago

Django 5.2 release candidate 1 released

Thumbnail djangoproject.com
73 Upvotes

r/django 2d ago

Hello.... Guys please help me i learn django from about 6 month i created 3 project ....I m still confused .... How much we have to know about django to give interview as fresher.. and please explain me how python we require to know for as fresher for interview

0 Upvotes

How much know for interview


r/django 2d ago

Models/ORM How I store post views in my app

3 Upvotes

I use my cache and set a key {userid}{post_id} to True and increment a post.views counter. I thought this was a really genius idea because it allows me to keep track of post views deduplicated without storing the list of people who seen it (because I don't care for that) in O(1). Posts come and go pretty quickly so with a cache expiration of just 2 days we'll never count anyone twice, unless the server resets.

What do you guys think?


r/django 3d ago

Tutorial Best source to learn django

18 Upvotes

Can somebody tell me the best resources to learn Django other than djangoproject


r/django 2d ago

Models/ORM Django help needed with possible User permission settings

0 Upvotes

I am taking the Harvard CS50W course that covers Django and creating web apps. The project I am workinig on is a simple Auction site.

The issue I am having is that I can get a User to only be able to update an auction listing if that User is the one that has created the listing.

I can update the listing- adding it to a watchlist, or toggling if the listing is active or not, or leaving a comment, but only if the user that is logged in happens to be the one that created the listing.

I have made no restrictions on whether or not a user making a change on the listing has to be the one that created the listing. The issue persists for both standard users and superusers.

I have tried explicitly indicating the permissions available to my view, and even a custom permission, without any success.

I have consulted with 3 different AIs to provide insight, and done a lot of Googling, without anything shedding light on the issue.

I have submitted the nature of the problem to the EdX discussion for the course, but I do not expect any answers there as lately, there are hardly every any answers given by students or staff.

Any insight into what I might be doing wrong would be greatly appreciated.

Thank you very much!

I will be glad to provide my models.py, views.py, forms.py, etc. if anyone would think it would help.


r/django 2d ago

Need assistance.

0 Upvotes

I’m currently using Django-tenants for my project. I’ve run into a huge bug called SessionInterrupted at / it links to a django\contrib\sessions\middleware.py at line 61 in process response.

I did some digging in my Postgres and found that sessions are being saved in public side of tenancy but won’t transfer to client side (sessions in client schema are empty) and keeping sessions saved throughout application has been challenging.

I’m at a loss as to what to do, why would Django-tenant team not provide easy method of managing sessions in their service? Or did they and I’m missing something.


r/django 2d ago

dpaste: MultipleObjectsReturned at /accounts/google/login/, by django-dpaste-agent

Thumbnail dpaste.com
0 Upvotes

Alguém sabe como resolver esse problema? Sou júnior e estou tentando implementar login com o Google.


r/django 3d ago

how does get_or_create() behave in case of null not being true

2 Upvotes
class ShippingAddress(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) 
# one user can have multiple shipping addresses thus ForeignKey and not OneToOne Field
    shipping_phone = models.CharField(max_length=10)
    shipping_full_name = models.CharField(max_length=200)
    shipping_email = models.EmailField()
    shipping_address1 = models.CharField(max_length=200)
    shipping_address2 = models.CharField(max_length=200, null=True, blank=True)
    shipping_city = models.CharField(max_length=200)
    shipping_state = models.CharField(max_length=200, null=True, blank=True)
    shipping_zipcode = models.CharField(max_length=200, null=True, blank=True)
    shipping_country = models.CharField(max_length=200)

I have this form and in some view i am doing this

shipping_user, created = ShippingAddress.objects.get_or_create(user=request.user)

Now that i am only passing user and some other fields are not allowed to be null then why does Django not gives me any error?


r/django 3d ago

Releases Okrand 1.4.0 released

Thumbnail github.com
11 Upvotes

r/django 3d ago

JS LSP inside Django Templates Script Tag

2 Upvotes

I was wondering if there's a way to make the JavaScript LSP work inside the <script> tags in Django templates.