possible side effect:

I wrote some class that runs during settings.py and customizes settings
(dev/live/beta)


it logs when doing that, and so I've noticed that settings gets parsed 4
times !

loading ENVIRONMENT: local_settings.py
SITE_URL is: http://127.0.0.1:8000
loading ENVIRONMENT: local_settings.py
SITE_URL is: http://127.0.0.1:8000
loading ENVIRONMENT: local_settings.py
SITE_URL is: http://127.0.0.1:8000
loading ENVIRONMENT: local_settings.py
SITE_URL is: http://127.0.0.1:8000
Validating models...
0 errors found

Django version 1.0-final-SVN-9014, using settings 'sustain.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.


so you might just have appended 4 times.  worth investigating.
check the path before appending.


anyway, I would do it in the .wsgi



On Thu, Feb 19, 2009 at 6:10 AM, David Zhou <da...@nodnod.net> wrote:

>
> I've been doing the following for a while, but I'm not sure if it has
> unintended side effects:
>
> #settings.py
> import os, sys
> sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),
> 'apps'))
>
> I keep pluggable apps in an svn repo, and do checkouts of the ones I
> need in the apps folder that's specific to whatever site I'm working
> on.  And since I do this for most of my projects, I figured it'd be
> easier to make sure it was in the pythonpath rather than relying on
> the environment to properly define pythonpath.
>
> Is it considered bad practice to dynamically modify the pythonpath in
> something like settings.py?
>
> -- dz
>
> >
>

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

Reply via email to