need add RELATIVE_URL_ROOT as a default settings for project?

35 views
Skip to first unread message

vicalloy

unread,
May 23, 2011, 11:19:29 PM5/23/11
to django-d...@googlegroups.com
if project is hosted at : mydomain.com/hidjango/
you need do some settings.
1. the session path need set to /hidjango/, but it will use default set '/'.
2. also you need create a hidjango_urls like:
urlpatterns = patterns('',
    (r'^hidjango/', include(urls)),
)
3. modify LOGIN_URL

need add a settings  as ROR's  RAILS_RELATIVE_URL_ROOT?
link:

--
LBForum<<django powered forum>>: http://vik.haoluobo.com/lbforum/
My Blog: http://vik.haoluobo.com/blog/

Russell Keith-Magee

unread,
May 25, 2011, 9:12:36 PM5/25/11
to django-d...@googlegroups.com
On Tue, May 24, 2011 at 11:19 AM, vicalloy <zbi...@gmail.com> wrote:
> if project is hosted at : mydomain.com/hidjango/
> you need do some settings.
> 1. the session path need set to /hidjango/, but it will use default set '/'.
> 2. also you need create a hidjango_urls like:
> urlpatterns = patterns('',
>     (r'^hidjango/', include(urls)),
> )
> 3. modify LOGIN_URL
> need add a settings  as ROR's  RAILS_RELATIVE_URL_ROOT?
> link:
> http://guides.rubyonrails.org/v2.3.8/configuring.html#rails-environment-settings

This has been proposed and rejected in the past:

https://code.djangoproject.com/ticket/8906

The reasoning for this decision stems from the fact that settings.py
is intended to be a project-specific file, not something that is a
redeployable asset. Therefore, you *should* need to modify settings.py
if you want to deploy to a different sub-URL.

There is a separate discussion about whether LOGIN_URL should be
easier to use -- in particular, whether it should allow the use of
named URLs.

Yours,
Russ Magee %-)

Chris Beaven

unread,
May 26, 2011, 4:52:11 AM5/26/11
to django-d...@googlegroups.com
On Thursday, May 26, 2011 1:12:36 PM UTC+12, Russell Keith-Magee wrote:

There is a separate discussion about whether LOGIN_URL should be
easier to use -- in particular, whether it should allow the use of
named URLs.

I know that it's not exactly the solution that the discussion was about, but one solution available now is to set LOGIN_URL using the new reverse_lazy function.
Reply all
Reply to author
Forward
0 new messages