33 ms·
About two years ago I tried a lot of different frameworks and languages to find which one would suit me best. After having tried various PHP frameworks, J2EE, P
by micaelwidell 16y ago
About two years ago I tried a lot of different frameworks and languages to find which one would suit me best. After having tried various PHP frameworks, J2EE, Perl I arrived at Django/Python. The plan was to continue on to Rails after Django, but I loved Django so much that I couldn't imagine that Rails could be any better. Seems like I was right ;)
Like the author, I too think Django's default directory structure doesn't work very well once you start doing bigger projects. But luckily, everything is so loosely coupled that you can change the directory structure entirely without too much work.
- jonknee 16y ago> Like the author, I too think Django's default directory structure doesn't work very well once you start doing bigger projects. But luckily, everything is so loosely coupled that you can change the directory structure entirely without too much work. Some of it doesn't even work well for small projects--the first thing I do after ./manage.py startproject is change around settings.py so I can have local settings (namely db stuff) and not have to change things around when I push it to a server.
- limist 16y agoFor useful, non-trivial directory structure examples for Django projects, be sure to see the Pinax project: http://pinaxproject.com/ http://pinaxproject.com/ Pinax comes with quite a few example projects using a common directory structure, which is very well thought-out, separating media, reusable apps, common templates, etc.
- jules 16y agoAs somebody who has used both Rails and Django commercially I can safely say that I prefer Rails over Django even though I like Python more as a language. This guy marks several advantages of Rails as weaknesses. Migrations for example. In Django you have to migrate manually, or lose data. Lack of migrations is not an advantage. Templates. The Django template language is one of the worst in existence. It is utterly inflexible and hard to use. It is slowly getting better: now you can use `if a == b` instead of `ifequal a b`. Why not go all the way to a usable and powerful template language?!
- bad_user 16y ago> As somebody who has used both Rails and Django commercially ... In Django you have to migrate manually, or lose data If you've been using Django "commercially", then how come you haven't heard of South? ... http://south.aeracode.org/ http://south.aeracode.org/ Everybody in the community that wants migrations is using it. > Why not go all the way to a usable and powerful template language?! In Django components are more decoupled than in Rails. You can replace that templating engine. Also, Django's templating system is really not that inflexible or hard to use ... quite the contrary, it comes with many things out-of-the-box that aren't standardly provided by other web frameworks ... like the ability to cache page fragments.
- jules 16y agoOf course those are valid points but we are comparing default feature sets here. Otherwise Rails has a crippled template language, database generated from model and automatic admin too. Have you actually used Rails? Rails has fragment caching built in and you can use a different template engine very easily (just install the engine xyz you want to use and write templates with extension .xyz instead of .erb)
- catch23 16y agoIt's kind of odd that the default subsystems that come with Django are always replaced with something else -- why doesn't Django include some sane defaults instead?
- bad_user 16y agoThis implies that Rails has "sane defaults". From my experience that's hardly the case ... ActiveRecord (pre 3.0 at least) sucks big monkey balls compared to Django's ORM. And Rails also doesn't have anything like the forms API in Django.
- deleted 16y ago[deleted]
- cdr 16y agoSee http://ericholscher.com/projects/django-conventions/ http://ericholscher.com/projects/django-conventions/ also.