Django: first impressions
A month or so ago I was anticipating a move into Django. I started on some of the Hello World tutorials on the django site, and I wanted to share the few observations from my very brief encounter with Python via Django.
- Double underscores?!! Whose idea was that? Does that end up being a pain when writing in Django? I remember that Ruby uses the double underscore too, but Rails doesn’t use this construct frequently from what I remember. Please someone write in and tell me I am mistaken about the frequency in use of double underscores in Django.
- The setup with sqlite was straight forward and simple—more simple than in Rails. It has been my impression, however, that this ease (or lack of ease) has more to do with the database installation on the operating system, than it does with actual integration with the framework. In other words, the problems that I have encountered with setting up database connections in other frameworks occur while trying to setup the data source itself.
- Is the settings.py file supposed to be like the web.xml in j2ee and the environment.rb in Rails? It seems that database information goes in this file, which is different than in j2ee and Rails where you have separate files to specify the database connections (e.g. context.xml and database.yml).
Overall, I would be interested in working more with Django.
506 tar xzvf Django-1.1.1.tar.gz 507 cd Django-1.1.1/ 508 sudo python setup.py install 509 python 510 ls -al 511 vi INSTALL 513 django-admin.py startproject Test 514 cd Test/ 515 ls -al 516 python manage.py runserver 517 python manage.py syncdb 518 python manage.py startapp polls 519 cd polls 520 python manage.py sql polls 521 cd .. 522 python manage.py sql polls 523 python manage.py syncdb

