I would like to see this, it seems to be an idiom that most people use.  I
know i have to implementent that exact same thing for every project I have
ever done with django.

On Thu, Oct 30, 2008 at 1:34 PM, Ole Laursen <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> There are a couple of things in settings.py that require an absolute
> path. I don't know about you, but I tend to put all things related to
> a project in subdirectories under the project directory. Thus all the
> absolute paths have the same prefix, the project directory. Rather
> than going trough the hassle of maintaining this by hand, I have begun
> using the following snippet:
>
> PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
>
> then for instance
>
> MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
>
> and
>
> TEMPLATE_DIRS = (
>    # Always use forward slashes, even on Windows.
>    os.path.join(PROJECT_DIR, 'templates/'),
> )
>
> Would it make sense to put this or something like it in Django?
>
>
> Ole
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to