Things are looking up so far, but minor points:
1) That after setting the DJANGO_SETTINGS_MODULE environment variable, I still have to be in myproject/apps before I run django_admin.py startapp myapp. Why? That setting plus the Django install root should be enough to figure out where the myapp folder should be created.
2) It seems the django_admin.py install myapp command only sets up tables in the database. If that’s the case, why isn’t the command django_admin.py sqlcommit myapp or something? The following parameters are valid for other SQL operations:
sqlinitialdata sqlindexes sqlclear sqlall sql
and you can also validate the models separately with django_admin.py validate myapp, so the install option is quite unintuitive.
3) While we’re on the topic, why not just commit convenience scripts so I can just say sql [--settings project.settings.main] instead of having to run django-admin.py explicitly?
4) I keep getting this when creating new projects:
File "Z:\Work\trunk\django\core\template_file.py", line 22, in load_template_source
raise TemplateDoesNotExist, error_msg
TemplateDoesNotExist: Tried ['Z:\\Work\trunk\\django\\conf/admin_templates\\login.html']
The fix is simple: update the TEMPLATE_DIRS property in project/settings/admin.py.
(This was actually written yesterday night before I went to bed, but Typo/Rails was misbehaving so I couldn’t post it then.)



0 Responses to “Django (part 2)”