Re: Absolute paths in settings.py

2008-10-31 Thread Ole Laursen
On 30 Okt., 22:55, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > There should be significantly greater number of Django projects that are > deployed without any fancy stuff involved. > Anyway, if someone wants to deploy his project as egg it would be easy to > just change "PROJECT_DIR =.." as all

Re: Absolute paths in settings.py

2008-10-30 Thread Valts Mazurs
On Thu, Oct 30, 2008 at 10:23 PM, James Bennett <[EMAIL PROTECTED]>wrote: > Except for the part where it breaks/causes headaches for eggs and > zipped packages, both of which are somewhat popular in this Python > world. There should be significantly greater number of Django projects that are

Re: Absolute paths in settings.py

2008-10-30 Thread James Bennett
On Thu, Oct 30, 2008 at 3:20 PM, Rob Hudson <[EMAIL PROTECTED]> wrote: > Not necessarily true. If this code were in the settings.py from the > project_template it would get laid down in your project when you ran > django-admin.py startproject, which is, I think, the appropriate place > for this

Re: Absolute paths in settings.py

2008-10-30 Thread Rob Hudson
On 10/30/08, Thomas K. Adamcik <[EMAIL PROTECTED]> wrote: > If django where to ship something like this __file__ would point to somewhere > within the installation folder of django, which is obviously not what we > want. Not necessarily true. If this code were in the settings.py from the

Re: Absolute paths in settings.py

2008-10-30 Thread Thomas K. Adamcik
On Thu, Oct 30, 2008 at 10:06:17PM +0200, Valts Mazurs wrote: > It would be useful to have at least this one by default: > PROJECT_DIR = os.path.abspath(os.path. dirname(__file__)) If django where to ship something like this __file__ would point to somewhere within the installation folder of

Re: Absolute paths in settings.py

2008-10-30 Thread Valts Mazurs
It would be useful to have at least this one by default: PROJECT_DIR = os.path.abspath(os.path. dirname(__file__)) Other defaults such as MEDIA_ROOT and TEMPLATE_DIRS also would be useful for me as I repeat these exact lines for every project. Regards, Valts. On Thu, Oct 30, 2008 at 8:44 PM,

Re: Absolute paths in settings.py

2008-10-30 Thread matt westerburg
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

Absolute paths in settings.py

2008-10-30 Thread Ole Laursen
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