I wouldn't say it's frowned upon, per se, but you're making things
hard for yourself.  Why not add Django to your Python path?

There are other ways to go, too...

In the shell you're working in:
$ export PYTHONPATH=~/pkg/django-trunk
Then ./manage.py will find it without editing the file.

For myself, I have multiple versions of Django in a folder in my home
directory and manage which one is used via a .pth file in my Python
path.  See this snippet:
http://www.djangosnippets.org/snippets/641/

-Rob

On Jan 4, 1:56 am, George Cox <george....@gmail.com> wrote:
> Hi,
>
> I keep my django-trunk installation (and other things like
> django_evolution) in my home directory, outside the system-wide
> installation   To avoid having to set PYTHONPATH in the environment, I
> set do this in my project settings.py file:
>
> # ---- sys.path trickery
> -----------------------------------------------
> import os, os.path, sys
> root = os.path.abspath( os.path.dirname( __file__ ) or os.curdir )
> sys.path.insert( 0, os.path.normpath( os.path.join( root, '..', '..',
> 'pkg', 'django-trunk' ) ) )
> sys.path.insert( 0, os.path.normpath( os.path.join( root, '..', '..',
> 'lib' ) ) )
>
> as such, it's necessary to edit manage.py to move the "from
> django.core.management import execute_manager" below the "try / import
> settings / except" block.
>
> Is this frowned upon?  If not, hope this helps someone. :-)
>
> gjvc
--~--~---------~--~----~------------~-------~--~----~
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