So, Im learning django from djangobook.com and a bit confused about the project skeleton created by the following command.
django-admin.py startproject mysite
This creates the following tree.
mysite
– manage.py
– mysite
– init
– settings
– urls
– views
But the book says it should create the tree below:
mysite/
init.py
manage.py
settings.py
urls.py
I’m using Python 2.7.3 on Windows 7 pro 64 bit. Django version is 1.4.
The book is teaching using Django ver 1.1. I suspect the difference in project skeleton is due to the newer version of django that Im using.
So is it because of the newer version? If so, why was this change made in django?
TIA.
Right, the project layout has changed since Django 1.4.
You will get more information about the reasons on this page:
https://docs.djangoproject.com/en/1.4/releases/1.4/#updated-default-project-layout-and-manage-py
I would also recommend to do at least the official tutorial from the website which is up to date:
https://docs.djangoproject.com/en/1.4/intro/tutorial01/
They explain the project layout.