Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#18493 closed Cleanup/optimization (fixed)

Tutorial #2 could better hint where "source code of Django itself" is

Reported by: travisgriggs@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: florian+django@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

I am working my way through the excellent tutorials. They really are good, and I'm really liking Django already. Everything's gone OK, nothing too show stopping. Until I got to the end of tutorial #2. The part where you're supposed to copy the admin/base_site.html from "source code of Django itself" to your own local directory. The problem is that I'm on OSX and finding where the original was turned into a long and trying search (where I discovered things like SpotLight does not index /Library or a lot of other things).

Assuming it's a python newbie, it would be nice if there was a hint as to where that is on OSX (and a Windows user would probably have the same experience). You dl django, you do the 3 line install, and then jump into the tutorial, but you don't really know/remember/realize at the end of tutorial 2 where in the world those files are.

Attachments (1)

18493.diff (777 bytes ) - added by Claude Paroz 13 years ago.
Hint to find Django sources

Download all attachments as: .zip

Change History (7)

by Claude Paroz, 13 years ago

Attachment: 18493.diff added

Hint to find Django sources

comment:1 by Claude Paroz, 13 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [c68f4c514c7b1102772b6ea11e9e59c7c87f7fae]:

Fixed #18493 - Added instructions to locate the Django source files to the t

Thanks Claude Paroz for the draft patch.

comment:3 by Tim Graham <timograham@…>, 12 years ago

In [32bd77d392e331e823792abcd9d31045f681776d]:

[1.4.X] Fixed #18493 - Added instructions to locate the Django source files to the t

Thanks Claude Paroz for the draft patch.

Backport of c68f4c514c from master

comment:4 by Florian Apolloner, 12 years ago

Cc: florian+django@… added

wouldn't a simple python -c "import django; print django" be easier?

comment:5 by Claude Paroz, 12 years ago

The bash line was copied from a similar example committed by Carl recently:

https://github.com/django/django/commit/6ed7d40727f70934df6ab0ac96f5f1c4f01c534f#L0R168

It may be that in the tutorial context, we don't need the sys.path trick? AFAICU, it depends on the probability that we have an uncompressed django download in the current directory...

in reply to:  5 comment:6 by Carl Meyer, 12 years ago

Replying to claudep:

It may be that in the tutorial context, we don't need the sys.path trick? AFAICU, it depends on the probability that we have an uncompressed django download in the current directory...

That's exactly correct. In the context of my commit, it's actually very likely the user is in the directory containing Django's setup.py, meaning the simple version will just return the local "django" directory, which is not helpful.

In the tutorial case it may not be quite so likely, but since either way it's a (likely opaque to the user) command we're asking them to copy-paste, I don't see the harm in using the slightly longer version that is more likely to return the answer they are looking for.

I wish Python had a command-line flag to disable adding the current directory to the beginning of sys.path.

Note: See TracTickets for help on using tickets.
Back to Top