> > > The only option I can is whether we put that snippet of code (e.g. > PROJECT_ROOT=os.path.realpath(os.path.dirname(__file__)) ) into the > settings file generated when starting a new project. >
+1 for adding this to settings, then adding a commented out os.path.join( PROJECT_ROOT, 'templates') with a brief explanation in the template dirs section, and the same for static. Recently, I went through all of the public startproject templates I could find (and most of their branches): django-project-skel, django-project-skelleton, and django-skel. In all three projects they use some form of PROJECT_ROOT and os.path.join(PROJECT_DIR, 'templates'). https://github.com/amccloud/django-project-skel/blob/master/project_name/settings.py https://github.com/rdegges/django-skel/blob/master/project_name/settings/common.py https://github.com/alex/django-project-skeleton/blob/master/project_name/settings/base.py Lincoln loop has in their best practices as well http://lincolnloop.com/django-best-practices/projects.html#settings I'm under the impression that this is something that nearly everyone does -- are there a large number of cases where people explicitly decide not to use os.path.join and a PROJECT_ROOT variable? Ted -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/VVK1CzrP7AcJ. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.