r/django • • May 28 '20

Tutorial Why is the documentation so hard to navigate?

0 Upvotes

Like seriously. It's a complete mess.

There should be a sidebar with each concept neatly organized. For example, check out the [Bootstrap Documentation](https://getbootstrap.com/docs/4.5/getting-started/introduction/)

Nice, neatly organized sidebar. It's simple, minimal and easy to find stuff.

But Django decides to be unique by not having a sidebar and instead scattering links everywhere. If you don't think it's bad, go to https://docs.djangoproject.com/en/3.0/ and find the neat, organized section on how to use Django with postgresql. Because I couldn't find it and had to watch a YouTube tutorial instead. It should not suck this bad.

Don't get me wrong. Django is a beautiful, well-made web framework. I just think its documentation should be organized better.


r/django • • Mar 24 '26

Article Why I Still Choose Django for Serious Projects?

0 Upvotes

I built a “Solo AI Developer Stack” after trying a lot of tools (Django is still underrated)

Over the past months I’ve been building projects as a solo developer using AI, and I kept running into the same problem:

Most stacks online are designed for teams, not solo builders. So I started simplifying everything.

After experimenting with different setups, I ended up with a stack that lets me:

  • Build SaaS products faster

  • Integrate AI features easily

  • Avoid over-engineering

  • Stay Production Ready

Surprisingly… Django ended up being the core of my stack.

A lot of people say:

  • “Don’t choose Django anymore.”

But for solo devs building real products, I think it’s still one of the best options.

Instead of spending weeks building infrastructure, you can focus on the product, and when you're integrating AI features, this becomes even more useful.

Why Django actually works well for solo AI developers

  • Built-in authentication

  • Admin panel (huge time saver)

  • Security already handled

  • Mature ecosystem

  • Easy API creation with DRF

  • Scales well when your product grows

Instead of managing:

  • multiple services

  • complex backend frameworks

  • auth systems

  • dashboards

You get most of it out of the box.

That matters a lot when you're building alone.

The stack I currently use

Backend

  • Django

  • Django Rest Framework

AI

  • OpenAI APIs

  • Gemini

  • AI-assisted development workflow

Database

  • PostgreSQL

Deployment

  • Cloud + CI/CD

Frontend

  • Depends on the project (I keep it flexible between Svelte, React and NextJs)

The best choice for my profile is Django.

Don’t get me wrong! This isn’t about claiming Django is objectively better than every other framework out there. There are excellent tools in every ecosystem, and many of them shine in the right context. But context is everything. When you’re a solo AI developer building a CRM as an entrepreneur, the constraints are real: limited time, limited surface area for bugs, and zero room for unnecessary architectural overhead.

In that reality, the goal isn’t ideological purity or chasing trends; it’s execution. You need a framework that lets you ship fast, stay in control, and integrate AI features without fighting your own stack. Django fits that profile exceptionally well, not because it’s fashionable, but because it removes friction where it matters most and lets you focus on building a product, not assembling infrastructure.

Choosing the right technology stack can feel overwhelming when you’re building a CRM alone, especially when AI is part of the vision. The market is noisy, opinions are polarized, and most comparisons are written for teams with time, budget, and specialized roles. As a solo AI-driven entrepreneur, my reality is different: every architectural decision directly impacts my speed, focus, and ability to ship something real.

I wrote a full breakdown of how the stack works together and why I chose each tool on my personal blog.

Think about it that way:

We’re building in the age of AI, and most AI tools are built around Python. Django runs on Python and is designed for building real production applications. When you look at it from that perspective, choosing Django is not only reasonable, it’s actually a very logical choice, and often the simplest and most practical path.

Question for other solo devs

  • What stack are you using to build AI products right now?

I’m curious what people are shipping with.

Quick note for AI haters:

For all those who pretend to hate AI today, and who think that developing and writing with AI is "awful slop": Good luck! The Industrial Revolution of the mid-18th century (1760-1840) saw worse.


r/django • • Apr 25 '22

Why is Vue the preferred front end for Django applications?

0 Upvotes

r/django • • Nov 06 '16

Django 1.10.3 adds important change in settings

Thumbnail
python-programming.courses
2 Upvotes

r/django • • Dec 05 '17

9 Prerequisites for Django | How Much Python to Learn Django?

Thumbnail
csestack.org
2 Upvotes

r/django • • Dec 05 '23

Article I was curious how django keeps track of all my model classes...

3 Upvotes

Ever wondered what happens under the hood when you run python manage.py makemigrations in Django? I recently asked this to myself and went through the rabbit hole of reading the Django code base.

I wrote a short blog post with a short deep dive into the model detection mechanism. No magic wands, just a bit of metaclasses, the new method, and a dash of django.setup().

EDIT: removed the link as I see the critcism. Don't need any traffic to my site. Just want to share my learning. Pasting the contents of my post if someone is interested.#

How Django keeps track of your model classes?

I have ran the python manage.py makemigrations command several hundreds of times. Recently I had a surge of curiousity to find out how does django detect changes and generate migration files for an app.

I needed many answers but one of the first question I had was "How does Django keep track of my model classes?"

In Django, the creation of model classes is fundamental to mapping your application's data model to a database. These model classes inherit from Django's models.Model base class, which provides them with essential database interaction capabilities.

Under the hood, Django employs metaclasses to achieve its model detection magic.

But what exactly is a metaclass in Python?

Simply put, a metaclass allows you to customize class creation in Python. In case of Django's model system, the metaclass responsible for this process is called ModelBase.

Within the ModelBase metaclass, a crucial method known as __new__ plays a central role. This method invokes the register_model function, which, in turn, ensures that a given model registered within the app.

    class ModelBase(type):
        """Metaclass for all models."""
   
        def __new__(cls, name, bases, attrs, **kwargs):
            super_new = super().__new__
 
            ...
            new_class._prepare()
            # this is where a model class gets registered.
            new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
            return new_class

But when does this new method on ModelBase get triggered?

To my surprise I found out that it gets activated at import time. When you import a model class, Django's model detection process initiates. For example:

    from myapp.models import MyModel

Behind the scenes, Django's machinery begins to work its magic during this import.

So, where does Django import all these models?

The answer lies in django.setup(), the entry point for various Django commands such as shell, makemigrations, migrate, runserver, and more.

Within django.setup(), the apps.populate(settings.INSTALLED_APPS) function registers all of your INSTALLED_APPS.

    !# django/django/__init__.py
    def setup(set_prefix=True):
        """
        Configure the settings (this happens as a side effect of accessing the
        first setting), configure logging and populate the app registry.
        Set the thread-local urlresolvers script prefix if `set_prefix` is True.
        """
        ...
        apps.populate(settings.INSTALLED_APPS)

When I followed the code to the populate method, I could see it is defined under the Apps class. Within this method there is a method call as app_config.import_models(). The app_config derives from the config class we define for every new django app under apps.py.

    !# django/django/apps/registry.py
    class Apps:
        """
        A registry that stores the configuration of installed applications.

        It also keeps track of models, e.g. to provide reverse relations.
        """

        def __init__(self, installed_apps=()):
            ...
            ...
            if installed_apps is not None:
                self.populate(installed_apps)

        def populate(self, installed_apps=None):
            """
            Load application configurations and models.

            Import each application module and then each model module.
            """
            ...
            ...
                # Phase 2: import models modules.
                    for app_config in self.app_configs.values():
                        app_config.import_models()

And finally to where the place where "magic" happens. On the AppConfig class we have a method import_models which reads the MODELS_MODULE_NAME which by default is set to models.py and imports the whole file as a module. Thereby importing all the model classes in it.

    !# django/django/apps/config.py
    class AppConfig:
        """Class representing a Django application and its configuration."""
        def import_models(self):
            # Dictionary of models for this app, primarily maintained in the
            # 'all_models' attribute of the Apps this AppConfig is attached to.
            self.models = self.apps.all_models[self.label]

            if module_has_submodule(self.module, MODELS_MODULE_NAME):
                models_module_name = "%s.%s" % (self.name, MODELS_MODULE_NAME)
                self.models_module = import_module(models_module_name)

In summary, Django's model detection process leverages metaclasses, specifically the __new__ method, to register model classes during import time.

When you execute a Django command, such as makemigrations or migrate, Django uses django.setup() to import all the models from the models.py files of your installed apps. This is further utilised in various checks and actions performed by django for generating or executing migration files. You can see an example from the makemigrations command below.

    !# django/django/core/management/commands/makemigrations.py
    class Command(BaseCommand):
        help = "Creates new migration(s) for apps."
        ...
        @no_translations
        def handle(self, *app_labels, **options):
            ...
            ...
            for alias in sorted(aliases_to_check):
                connection = connections[alias]
                if connection.settings_dict["ENGINE"] != "django.db.backends.dummy" and any(
                    # At least one model must be migrated to the database.
                    router.allow_migrate(
                        connection.alias, app_label, model_name=model._meta.object_name
                    )
                    for app_label in consistency_check_labels
                    for model in apps.get_app_config(app_label).get_models()
                ):
                ...

r/django • • Oct 31 '21

Article Django performance: use RAM, not DB

0 Upvotes

In my new article, I have shown how fast your Django application can be if you save a copy of your database (or partial copy) in a simple Python List. You are welcome to read it here.

It's an extremely simple experiment that makes the responses 10 times faster.


r/django • • Sep 07 '19

Flask vs Django- The Hot Debate of Python Development Section

Thumbnail
data-flair.training
1 Upvotes

r/django • • Mar 15 '25

Web developers assemble! We are going to validate our ideas before we develop them.

0 Upvotes

I'm launching my SaaS in the next 60 days. (I've never done this before)

I am going to build an ideas validator. As I don’t know if my ideas will be worth investing time and resources in.

I saw many YouTubers doing their own SaaS and thought maybe I could do it, too. So, I procrastinated for a long time, but finally, I gave myself a challenge.

- I don't know how to code.
- I don't have the technical experience.
- I don't have the expertise.

All I have is me and my determination to do it.


r/django • • Mar 11 '25

Happy International Women's Day! 🎉 💜

Thumbnail
djangoproject.com
0 Upvotes

r/django • • Sep 03 '16

Why is no one talking about django?

1 Upvotes

I have been pouring over django documentation from past couple of weeks and whenever I search anything on web about django, all the resources like Stack Overflow answers, blog post etc are from around 2010 using old django versions from which many things are changed in newer ones. Since django itself is in active development, is nobody using it or that no one is talking about it because the documentation is so great.


r/django • • Aug 13 '23

Is Django good for production grade apps?

1 Upvotes

I have a Python script using which I would like to create a SaaS web app. Is Django good for such purposes. I am new to Django and am willing to learn it provided it serves the purpose.


r/django • • Apr 30 '22

Templates Here are the pros and cons of the front end frameworks. what am I missing. What works best with Django

0 Upvotes
  1. React.

    1. Huge Community

    2. react native - cross-platform

    3. huge library of things built for it

    4. stable

    5. most people use this

  2. Vue

    1. I like this

    2. new and seems faster and easier

    3. growing community

    4. great devs

    5. works well with Django from what I have heard

    6. doesn't support mobile directly

  3. Angular

    1. Lets not talk about this please

  4. HTMX

    1. Probably what I will end up going with

    2. Doesn't have support for mobile (native)

    3. smaller community

    4. works extremely well with Django

    5. I love the way it works. So smart

  5. Svelte

    1. new

    2. interesting

    3. easy

    4. will integrate well

don't know guys, I am leaning towards HTMX for applications that will just be pwa or webapps. and for more robust apps wit DRF, I think React is a good pick


r/django • • Feb 20 '26

For the devs who use django templates....

0 Upvotes

I saw a guy in this subreddit ask you guys to choose from django templates or SPA etc...

My question is:

  • what is the selling point of django templates and why do people use them

  • are they slower to load than just calling a drf api from an SPA?

  • do clients want django templates? Because i had a client that paid me to migrate his django templates to React SPA with DRF... but didn't encounter the other way around....

  • do devs with experience in both SPA+DRF and templates actively choose templates either due to superiority or the use case?


r/django • • May 03 '24

Can someone please be my instructor and teach me django....

0 Upvotes

Hi! Ive started learning django and im going through the documentation tutorials. Im on tutorial 4 right now. Ive also followed a youtube tutorial for a todo app. My progress is very slow apparently and im overwhelmed. I dont have any guide or someone to show me a path.

Kindly help me. Like what should i do? I know i should complete the tutorial and make projects and learn along the way.

Can someone just assign me tasks?


r/django • • Apr 08 '09

Django Community: Please stop distributing your monkey patched Projects ... and start Distributing finely crafted APPS modeled after the stuff in contrib

0 Upvotes

r/django • • Feb 11 '26

Do i have to learn Flask first before Django?

0 Upvotes

I am new to programming and i have been coding for 4 months now and i built a good python foundation coz i spend at least 4hrs a day coding and the reason i started to learn to code is to build my own startup ideas myself to avoid the struggle to search for a technical cofounder.

I have heard that in order to learn Django i have to learn and understand Flask deeply first. Is that true? Do i have to learn Flask first before i jump to Django? Can i just jump straight to Django right away?


r/django • • Jan 18 '24

Question: Why not to use Django for production?

0 Upvotes

Earlier someone asked 'why django?' at https://www.reddit.com/r/django/s/aVgA1zxqQe

I wanted to understand why one should not consider Django for production?

PS. I am a Django dev for 5 years. So I am aware of why use it in production env.


r/django • • Feb 23 '22

What do you think of Django Admin?

6 Upvotes

Hi Reddit!

We're building a drop-in replacement for Django Admin and we would like to know what you like and don't like about Django Admin:

https://docs.google.com/forms/d/e/1FAIpQLSfazbamWnsSUeACydTWkVcNLRnD7KLapORqSMClYWWG81JHhQ/viewform?usp=sf_link

Thanks for helping us improve Jolie! <3

- The Jolie Team


r/django • • Jan 07 '25

Full Stack Developer (Django & React) Seeking Opportunities

1 Upvotes

Hi everyone,

I’m a full-stack developer with nearly 2 years of experience working with Django and React. I’ve worked on building and maintaining web applications, REST APIs, PostgreSQL, and more.

I’m currently looking for job opportunities, preferably on-site roles in India or remote roles anywhere. I’m eager to contribute to meaningful projects and continue growing as a developer.

If you know of any openings or have advice to share, I’d be really grateful! Feel free to message me or reply here, and I’d be happy to share my resume or discuss further.

linkedin :- https://linkedin.com/in/rl0007

github :- https://github.com/rl0007

Thanks for your time and support!


r/django • • Aug 26 '11

Integrating a Django back end into a front end that's nothing more than a .png.

0 Upvotes

I'm just getting into Django, and before I do all the work of creating the back end, I wanted to make sure I could add the links to the buttons in the graphic file.

If anyone can confirm this (or better yet, link to documentation of it being done) I would be quite grateful.


r/django • • Feb 07 '23

Should I drop Django for web dev?

0 Upvotes

I've been learning Django for 2 months now and have built my first CRUD website. I like it. However I noticed that most of the jobs out there are for JavaScript frameworks. Not really many Django jobs, especially entry level.

Is it a smart idea to switch over if my primary goal is to land a job within a few months? I would either do backend or full stack, but right now the interest is in favor of backend dev


r/django • • Jan 23 '22

Hi I wonder if anyone can help me please. I am getting these weird emails signing up such as “[email protected]” and they are valid as far as Django is concerned. Can anyone help with the regex validation

0 Upvotes

r/django • • Oct 23 '24

Apps Django is amazing… I built an app to send cold emails in 30 mins

0 Upvotes

I was struggling to send cold emails manually as I didn’t want to pay an insane subscription for cloud solutions… so i just created a new Django project and in just 30 minutes was able to create a form with a list of emails, subject and message. And now I can send individual emails in bulk with just one click using internal Django functions that took me 10 minutes to set up!

The beauty of it being built in Django is that it :

✅ Is Self-hosted 🔒

✅ Sends from any domain I want (via SMTP) 📧

✅ Avoids IP flagging like with cloud solutions 🚫🚨

✅ Doesn’t have insane monthly fees 💸

✅ Has no email limits (and can use multiple domains to avoid platforms limits) 🚀💥

If you get an email from me in the next few days don’t be surprised I will be spamming every email in the internet with this app 🤩