Tutorial confusion: flat project layout with django 1.3.1

138 views
Skip to first unread message

garyrob

unread,
Oct 16, 2011, 10:27:42 PM10/16/11
to django...@googlegroups.com
I'm having a strange problem.

When I run

  django-admin startproject mysite

I get a directory structure that is flat in the sense that there is no inner mysite directory -- the manage.py and urls.py files are at the same level.

But Part 1 of the django tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/) shows a directory structure with an inner mysite, such that manage.py is at the top layer and urls.py is in the inner mysite. And it also says:

Doesn't match what you see?
The default project layout recently changed. If you're seeing a "flat" layout (with no inner mysite/ directory), you're probably using a version of Django that doesn't match this tutorial version. You'll want to either switch to the older tutorial or the newer Django version.

But the tutorial is for version 1.3, and my django.VERSION is (1, 3, 1, 'final', 0).

So that is inconsistent. I'm wondering if, somehow, my virtualenv installation isn't causing the correct django-admin.py to be used. If I do

  which django-admin.py

it shows the version that's in the bin directory for the virtualenv for which I get the django.VERSION mentioned above, so I don't see how the virtualenv could be a problem.

Anyone have any ideas?

 

Kirill Spitsin

unread,
Oct 16, 2011, 11:37:03 PM10/16/11
to django...@googlegroups.com
On Sun, Oct 16, 2011 at 07:27:42PM -0700, garyrob wrote:
> I'm having a strange problem.
>
> When I run
>
> django-admin startproject mysite
>
> I get a directory structure that is flat in the sense that there is no inner
> mysite directory -- the manage.py and urls.py files are at the same level.
>
> But Part 1 of the django tutorial
> (https://docs.djangoproject.com/en/dev/intro/tutorial01/) shows a directory
> structure with an inner mysite, such that manage.py is at the top layer and
> urls.py is in the inner mysite. And it also says:
...

You are reading tutorial for development version of Django, and
startproject default layout was recently changed [1]. Tutorial for
1.3 is here: https://docs.djangoproject.com/en/1.3/intro/tutorial01/

[1] https://code.djangoproject.com/changeset/16964

--
Kirill Spitsin

Ramiro Morales

unread,
Oct 16, 2011, 11:39:09 PM10/16/11
to django...@googlegroups.com
On Sun, Oct 16, 2011 at 11:27 PM, garyrob <gar...@mac.com> wrote:
> [...]

> But Part 1 of the django tutorial
> (https://docs.djangoproject.com/en/dev/intro/tutorial01/) shows a directory
> [...]

> But the tutorial is for version 1.3
> 'final', 0).

I'd ike to ask you what visual part of that online tutorial page makes you
think you are reading the documentation for the 1.3 release and
not the in-development code one.

We've implemented a couple of different strategies so the visitor really
knows what docs she/he is actually reading , the last one
being the light green selector in the lower right corner of all
the documentation pages that shows and controls what version
you are reading.

Maybe we can try to make it even more visible but I'm afraid
we are running out of ideas for this persistent problem some
users keep running into.

Regards,

--
Ramiro Morales

garyrob

unread,
Oct 17, 2011, 4:51:22 PM10/17/11
to django...@googlegroups.com
Ah! Thanks everyone for the feedback.

The reason I was confused may be stupid, but FWIW here it is: Underneath the Search input area, there's a popup menu that says "Django 1.3". My eye went over there and registered the 1.3 without figuring out that it refers to what is being searched in. I recall the thought crossing my mind that if I went to a different item on the popup, it would take me to the equivalent docs for a different version. I see that you do have functionality like that -- it's just that it's in the bottom right rather than the top right. 

I'm not saying I didn't make a dumb mistake. Fact is, I didn't notice the "Documentation version" widget in the bottom right. I'm quite rushed right now, and don't spend a lot of time looking at the django docs, and did not absorb the fact that the popup that said "Django 1.3" is between the text input area for the search and the search button itself -- I just glanced over, and saw the version number. If the text to the left of the popup said "Search in version" rather than just "Version" the probability that I would have avoided the mistake would have been increased, but I'm not sure how much. If the popup text itself was "Search Django 1.3" rather than just "Django 1.3" I am pretty sure I wouldn't have made the mistake.


garyrob

unread,
Oct 17, 2011, 4:56:30 PM10/17/11
to django...@googlegroups.com
Actually, it seems like the search popup should focus on whatever documentation you're looking at. So, instead of saying "Django 1.3" I would argue that it should have said "Django Dev". That would mean that it was defaulting to the use it would probably be put to, and simultaneously tell the reader which version of the docs he's looking at.
Reply all
Reply to author
Forward
0 new messages