Thursday, January 17, 2013

Re: Deployment and user libraries (builds on the Django tutorial)

On 01/17/2013 12:11 PM, Frederik T wrote:
> I've worked my way through the Django tutorial successfully, up to
> https://docs.djangoproject.com/en/dev/intro/reusable-apps/ which worked for
> the development test server.
> I have refactored out the polls application and turned it into a python
> package, as suggested, which I then installed as a local user library via "p
> ython setup.py install --user"
> This worked for the dev server as well.
>
> After that I set up apache and mod_wsgi and configured apache to bind the
> path to the application to /test/
> (WSGIScriptAlias /test/ /tmp/test/apache/django.wsgi, chowned to
> apache:apache)
> which also worked.
> What did not work, however, was apache, or python/django finding the polls
> package.
>
> I am pretty new to python/django but I am pretty sure that I should
> relocate the polls package.
> (currently @ /home/me/.local/lib/python2.7/site-packages/)
> Where is the best place to put it?
> Is there a better way to do this altogether?
>
>
>

If you're going to install it as a python package, either install it to
the system or to the user that mod_wsgi executes under or into a python
virtualenv. Basically you need to ensure that it's on the python path
for the user running the wsgi. You can add additional paths to the wsgi
to make sure it gets picked up too.

I also assume that the django site that your wsgi script points at has
your app in the settings.py under Installed Apps.

Enjoy,
Alex

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate