Hello! as much as I understand / agree the point of not using the dev version/doc especially for newbies, I found this https://code.djangoproject.com/ticket/20400 ticket about it that was closed as invalid.
Shouldn't this be open and valid instead? Otherwise this doc bug would never get fixed (in addition it's a worthy addition to the settings as best practice in my opinion)? Stefano On Wednesday, May 22, 2013 2:06:18 PM UTC+2, Tom Evans wrote: > > On Tue, May 21, 2013 at 10:08 PM, Christopher Spears > <cspea...@yahoo.com <javascript:>> wrote: > > I am working my way through the Django tutorial, and I have reached the > part > > where I am supposed to customize the look and feel of the admin. I am > > supposed to do that using the mysite\settings.py file (working on a > Windows > > laptop). I have two questions. > > > > At first, I just typed the following into the file: > > > > TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] > > > > I got an error message stating that os.path was not recognized. I > solved > > this by putting 'import os.path' at the top of the file. Does this mean > > there is a bug in the tutorial's documentation? I do not recall seeing > any > > instructions that told me to add this. > > > > After I solved the first problem, I now get this error message: > > > > File "C:\Users\Chris\Documents\django_dev\mysite\mysite\settings.py", > line > > 7, > > in <module> > > TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] > > NameError: name 'BASE_DIR' is not defined > > > > Am I supposed to now define BASE_DIR? > > > > Thanks! > > > > BASE_DIR is only mentioned in the tutorial from the in development > docs, which may not be the best place to start - chiefly because it > can have issues like this. > > If you don't mind encountering things like this, then using the dev > docs helps find issues like this that have been added since the last > release, but if you want a more checked and correct django docs, use > the ones from the latest release. > > Of course, you should always use the docs for the version that you are > actually using. I would recommend not using unreleased versions of > django to learn django though. > > Cheers > > Tom > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/41403496-a052-40a2-a8e3-23c75d423796%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.