sub url deployment

11 views
Skip to first unread message

Samy Vilar

unread,
May 26, 2011, 9:19:13 PM5/26/11
to Pinax Core Development
Hi, I've really enjoyed Pinax its an amazing project, Im having some
difficulties deploying my pinax project from a sub-url in essence
instead of / I need something like /mgt, but I really don't want to
modify all the urls, Im currently using nginx as the reverse proxy ...
We really can't create new sub-domains, it would require a ton of red-
tape so we are trying to deploy the project from a different url...

Please help me I've tried everything including.
http://stackoverflow.com/questions/3400782/deploying-django-under-a-sub-url-with-nginx-fastcgi

but I get a feedback loop.

Thank you.

Thomas Schreiber

unread,
May 29, 2011, 4:39:44 AM5/29/11
to pinax-c...@googlegroups.com
Try this snippet, it worked for me.
http://djangosnippets.org/snippets/2136/

Then at the bottom of your urls.py, you may need to mess with the media urls:

# relocate the url patterns under settings.ROOT_URL
relocate_site(getattr(settings, 'ROOT_URL', '/'), urlpatterns)

# static file serving - debug only
# do this *after* calling relocate_site, we don't want to relocate the
media urls
urlpatterns += staticfiles_urlpatterns()

> --
> You received this message because you are subscribed to the Google Groups "Pinax Core Development" group.
> To post to this group, send email to pinax-c...@googlegroups.com.
> To unsubscribe from this group, send email to pinax-core-de...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pinax-core-dev?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages