#18493 closed Cleanup/optimization (fixed)
Tutorial #2 could better hint where "source code of Django itself" is
Reported by: | 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)
Change History (7)
by , 13 years ago
Attachment: | 18493.diff added |
---|
comment:1 by , 13 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 12 years ago
Cc: | added |
---|
wouldn't a simple python -c "import django; print django"
be easier?
follow-up: 6 comment:5 by , 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...
comment:6 by , 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
.
Hint to find Django sources