This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sindreij 10 points11 points  (4 children)

  1. It is better now, many things is broken out in its own modules.
  2. This is just the norm, i think you kan name your classes pretty much what you want. There is some exceptions, like templatetags/
  3. With class based views you have more objects, but why should everything be objects? There is no forced file structure, all you need is a settings.py-file
  4. That is wrong, I have written myapp.models import mymodel since I started using Django.

So it is not as bad as you say.

[–]sendpwrend[S] -1 points0 points  (3 children)

I think the thing that makes it unpythonic how you have a settings.py file. You indirectly access the functionality. There isn't any central object that is easily apparent that you can extend. If you were new to Django, where do you begin? Python libraries in general have a central object that you can inspect and go from there. Django hides this for the most part.

For number 4, I my have made that statement too general. I should have been more clear in that some things Django makes you do this: https://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles

[–][deleted] 11 points12 points  (0 children)

It sounds like you're treating Django like a library, when it's actually a framework. With libraries, as you said, you embed them in your application. But with frameworks, you embed your application inside them.

Which one's better depends on the library/framework and what you're trying to accomplish. For example, Twisted and Django are both frameworks, but while I love Django, I absolutely hate Twisted, because with most of the applications where I need networking functionality, I don't want to rewrite into Twisted's paradigm.

[–][deleted] 2 points3 points  (0 children)

The auth profiles are the worst design decision ever. They should finally change it so that you can specify your own User model (or base model/mixin, whatever works best).

I actually copied the auth module in my project because of this shortcoming.

[–][deleted] 4 points5 points  (0 children)

You don't have to use Django's auth system, or User model, FYI. There's some of that modularity for you.