django (1.5)
1. python manage.py groundwork appname Modelname
2. move contents of the new 'urls.py' file to the project's 'urls.py', then delete the former file
3. remove the new 'settings.py' file as well
!!!
4. remember to add the path of your templates directory to 'TEMPLATE_DIRS' in the project's 'settings.py' file
5. add 'django-groundwork' in the settings.py file {InSTALLED_APPS}
if errors about the django version and something like 'url' should not be empty...
then the htmls should be checked, the problems are about the single quotation marks!
{% url depotapp.views.view_product item.id%}
{% url 'depotapp.views.view_product' item.id%}
1. python manage.py groundwork appname Modelname
2. move contents of the new 'urls.py' file to the project's 'urls.py', then delete the former file
3. remove the new 'settings.py' file as well
!!!
4. remember to add the path of your templates directory to 'TEMPLATE_DIRS' in the project's 'settings.py' file
5. add 'django-groundwork' in the settings.py file {InSTALLED_APPS}
if errors about the django version and something like 'url' should not be empty...
then the htmls should be checked, the problems are about the single quotation marks!
{% url depotapp.views.view_product item.id%}
{% url 'depotapp.views.view_product' item.id%}
本文介绍如何在Django 1.5中进行基本的应用配置,包括管理命令的使用、URLs配置文件的调整、settings文件的修改等内容。针对常见的设置错误提供了解决方案。
153

被折叠的 条评论
为什么被折叠?



