Has a Django Lite framework ever been considered?

I am just starting another tutorial on Django and this has a reminded me of a persistent curiosity I always have when working in Django. Was there ever a time when a ‘one app’ version of Django was considered?

I think the majority of first-timers to Django, if they stick with it, never build webapps that contain more than one app, during their first year - I would be very interested in that statistic, if that is something the community keeps track of. If that is true, I think that the dual project/app folder structure, namespacing, etc. might be a barrier for adoption to them.

This is just a curiosity of course. I was just wondering if a Django Lite version has ever been considered.

Thanks!

I don’t have any data to base this on, just some anecdotal evidence collected while answering questions here.

I’d say that of all the questions being asked, the directory structure is very low on the list.

If you divide the new Django people into two categories based on prior Python knowledge, those with Python experience are generally already familiar with Python modules, and aren’t bothered by that structure.

For the people diving into Django without existing Python knowledge, they are sometimes confused by it, but it doesn’t appear to be a sticking point.

Now to address your core question, one of the features of Django that has drawn me to it is that all the pieces work together coherently. The parts all fit together to form a “whole” that, to me, is much greater than the sum of its parts.
Yes, it all adds to the learning curve - it took me a long time to get to the level I am today, and I’m still learning. But my opinion is that you can’t really untangle any of it without reducing the value of the rest - and without leaving you in a position of having to write code yourself to fill those gaps.

There are also other frameworks available that provide various degrees of functionality. The world of Python is full of them. See WebFrameworks - Python Wiki for a reasonably up-to-date list.

IMO there’s no need for a Django “lite” mode or anything. Just alternative templates.

I maintain a repo with a couple of templates: GitHub - adamchainz/django-startproject-templates . I use the “simple core” structure for example projects in my writing and books.

I’ve also written about using Django from within a single file (and others have two). Here are my posts:

I definitely think there’s an educational basis for starting with a single file or package structure, but as Ken says it’s not a huge sticking point. I’ve seen all kinds of organically grown project structures that are confusing to me, but the developers using them seem happy :man_shrugging:

2 Likes

I am a Django apprentice and I have no problems with have more than one directory and several files if it is needed, Django is a “batteries included full stack web framework” so is expected this behavior.

What I really struggle with is how to have a “correct” starter template. In fact, last year I coded a personal scaffolding for what I most use in Django. But reading this post I realize how many changes it needs for what I have learning this months (Much of that reading the blog and github repositories of @adamchainz) . Every time I read something about this subject (project template) I learn a new mistake I have been making or things that could be better.
I have four productions project (all are small), the first one even lacks from environment variables because that was not important for me at that time, so in my case I think it would be more important to have a “ready to production” project template, but I guess there will be an opinion for every developer in this subjects.

Me too! I guess it’s part of the job…

really? Well, coming from you that’s encouraging.

What I have decided is to have a very opinionated template for my personal use. That make things simpler.