1👍
The default project template has been simplified in Django 1.6.You can see an explanation of the changes on the commit message on GitHub. If you need a setting like MEDIA_URL
, then add it in.
0👍
As we can see from the django 1.6 release
https://github.com/django/django/blob/master/docs/releases/1.6.txt
Simplified default project and app templates
The default templates used by :djadmin:
startproject
and :djadmin:startapp
have been simplified and modernized. The :doc:admin
is now enabled by default in new projects; the
</ref/contrib/admin/index>
:doc:sites </ref/contrib/sites>
framework no longer is. :ref:clickjacking
is now on and the database defaults to
prevention <clickjacking-prevention>
SQLite.If the default templates don’t suit your tastes, you can use :ref:
custom
project and app templates <custom-app-and-project-templates>
So we can just create a app ,such as django-admin.py startapp testapp,and create templates/testapp dir.Then put the html in the test/app/templates/testapp/test.html
we can use the html in the views.py like this
def index(request):
return render_to_response('testapp/test.html')
we should not add anything in the settings.py.
- [Answer]-Use ImagField from Django to save image paths in different directory other than MEDIA_ROOT
- [Answer]-Form posting Django
- [Answer]-Find specific words in set containing strings in python
- [Answer]-Accessing objects with OneToOne relationship to a model in Django