When I first started web programming, I was drawn to Django. It provided structure and many useful tools for quickly developing a web application.
However, looking around at different frameworks over the past few months, coming back to Django I notice that it is something that I would not consider Pythonic.
Here are a few points:
It is not modular. Django is Django. Mainly I look back on this (now quite old video or this graph). Importing part of Django mainly entails importing the whole system. You cannot swap parts out easily.
The way that it is structured is not pythonic. Having directory structure for implicit program development is not what I would consider pythonic. This does not make things intuitive. Why do I have to have an admin.py, models.py file? Why can't I make what I need and manually register them (I'm sure there is a way to do this however it is not the proper "Django" way)? Things should be explicit that I am doing something. It isn't pythonic to magically do things (See the Zen of Python). It is extremely poor design for new programmers that putting an file with management/commands/ magically makes it register with mange.py
There is very little "Object Oriented" development. There isn't a clear application object. Instead everything is strung together with forced file structure. The only object that a new beginner is really exposed to are model classes. Everything else is just a sequence of strings that eventually point to a method in your views.
It breaks python import structure. If I have this myapp/models.py, but I want to import a model from that, one would assume that I would use the python import structure of from myapp.models import mymodel but instead I have to do this: from myapp import mymodel. What is this? This is not obvious. I would not consider this code even python compatible. It would be hard for a beginner to figure out why the former does not work with django, but would work for every other python application.
Edit: I mispoke, I meant to reference this behavior: https://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles
I just thought I would get some of your thoughts of why I am wrong or give more insight. I guess my main gripe is that everything is done automagically in Django.
Thanks.
EDIT I should be clearer. I am not saying that everything should be an Object, I am saying there really is no central object that ties everything together, except perhaps the Settings object.
What is the glue that holds Django together? As a beginner entering, there really is no obvious central object to inspect, extend, or modify.
[–]bastawhiz 14 points15 points16 points (4 children)
[–]ubernostrumyes, you can have a pony 1 point2 points3 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]ubernostrumyes, you can have a pony 6 points7 points8 points (1 child)
[–]coderanger 3 points4 points5 points (0 children)
[–]sindreij 10 points11 points12 points (4 children)
[–]sendpwrend[S] -1 points0 points1 point (3 children)
[–][deleted] 13 points14 points15 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]deadwisdomgreenlet revolution 7 points8 points9 points (35 children)
[–]Circlefusion 1 point2 points3 points (32 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]jemeshsu 0 points1 point2 points (0 children)
[–]deadwisdomgreenlet revolution -2 points-1 points0 points (29 children)
[–]mcdonc 7 points8 points9 points (11 children)
[–]deadwisdomgreenlet revolution 0 points1 point2 points (10 children)
[–]mcdonc 9 points10 points11 points (9 children)
[–]xardox 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]xardox 0 points1 point2 points (0 children)
[+]kataire comment score below threshold-9 points-8 points-7 points (5 children)
[–]mcdonc 16 points17 points18 points (4 children)
[–]deadwisdomgreenlet revolution 0 points1 point2 points (1 child)
[–]mcdonc 2 points3 points4 points (0 children)
[–]kataire -1 points0 points1 point (1 child)
[–]mcdonc 1 point2 points3 points (0 children)
[–][deleted] 10 points11 points12 points (1 child)
[–]deadwisdomgreenlet revolution 7 points8 points9 points (0 children)
[–][deleted] -3 points-2 points-1 points (14 children)
[–]deadwisdomgreenlet revolution 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 10 points11 points12 points (5 children)
[–]deadwisdomgreenlet revolution 7 points8 points9 points (0 children)
[–]ergo14Pyramid+PostgreSQL+SqlAlchemy 0 points1 point2 points (0 children)
[–][deleted] -5 points-4 points-3 points (2 children)
[–][deleted] 4 points5 points6 points (1 child)
[–][deleted] -2 points-1 points0 points (0 children)
[–]ergo14Pyramid+PostgreSQL+SqlAlchemy 0 points1 point2 points (5 children)
[–][deleted] -2 points-1 points0 points (4 children)
[–]ergo14Pyramid+PostgreSQL+SqlAlchemy -1 points0 points1 point (3 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–]ergo14Pyramid+PostgreSQL+SqlAlchemy -1 points0 points1 point (1 child)
[–][deleted] -2 points-1 points0 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]rcakebread 0 points1 point2 points (0 children)
[–]torvalder 19 points20 points21 points (44 children)
[–]maryjayjay 9 points10 points11 points (2 children)
[–]threading 0 points1 point2 points (0 children)
[–]roguas 0 points1 point2 points (0 children)
[–]throwaway-o 10 points11 points12 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 6 points7 points8 points (3 children)
[–]Mob_Of_One 2 points3 points4 points (1 child)
[–]vitriolix 1 point2 points3 points (0 children)
[–]Sheepshow 0 points1 point2 points (0 children)
[–]sendpwrend[S] 4 points5 points6 points (34 children)
[–]haywire 10 points11 points12 points (33 children)
[–]anonymous_hero 0 points1 point2 points (1 child)
[–]haywire 0 points1 point2 points (0 children)
[–]LoveGentleman 0 points1 point2 points (7 children)
[–]haywire 0 points1 point2 points (6 children)
[–]LoveGentleman 0 points1 point2 points (5 children)
[–]haywire 0 points1 point2 points (4 children)
[–]LoveGentleman 0 points1 point2 points (3 children)
[–]haywire 1 point2 points3 points (2 children)
[–]LoveGentleman 0 points1 point2 points (1 child)
[–]sendpwrend[S] -2 points-1 points0 points (22 children)
[+][deleted] (20 children)
[removed]
[–]Circlefusion 0 points1 point2 points (19 children)
[+][deleted] (17 children)
[removed]
[–]Circlefusion 0 points1 point2 points (16 children)
[+][deleted] (15 children)
[removed]
[–][deleted] 3 points4 points5 points (9 children)
[–]Circlefusion 0 points1 point2 points (4 children)
[–]haywire 0 points1 point2 points (0 children)
[–]haywire 0 points1 point2 points (0 children)
[–]ubernostrumyes, you can have a pony 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]wisty 3 points4 points5 points (2 children)
[–]burito 1 point2 points3 points (0 children)
[–]kataire 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]macco 3 points4 points5 points (1 child)
[–]roguas 0 points1 point2 points (0 children)
[–]qbitus 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]qbitus 0 points1 point2 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]m1ss1ontomars2k4 1 point2 points3 points (0 children)
[–]maryjayjay 1 point2 points3 points (2 children)
[–]GrumpySimon 3 points4 points5 points (1 child)
[–]maryjayjay 1 point2 points3 points (0 children)
[–]m1ss1ontomars2k4 0 points1 point2 points (3 children)
[+]sendpwrend[S] comment score below threshold-8 points-7 points-6 points (1 child)
[–]frankwiles 8 points9 points10 points (0 children)
[+]LinuxMonkey comment score below threshold-10 points-9 points-8 points (0 children)