Hi, all great Django users and developers, I have a little problem.
To make @login_required work,
I have to configure those in settings.py:
root_url = '/root_url/'
LOGIN_URL = root_url + '/login/'
LOGOUT_URL =  root_url + '/logout/'

But this is obviously not a good idea, as it couples with project's
root url.

I tried to use:
LOGIN_URL = '/login/'
or
LOGIN_URL = 'login/'

the first can not work, apache would try to access http://localhost/login/,
not http://localhost/root_url/login/
the second option would not work, when access 
http://localhost/root_url/dira/pageb,
this would lead to access http://localhost/root_url/dira/login

urls.py
(r'^login/$', 'django.contrib.auth.views.login'),
(r'^logout/$', 'django.contrib.auth.views.logout')

The following are my configuration in apache's httpd.conf
Alias /root_url/ D:/ws/django/myproject/
<Location '/root_url/'>
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE Regrroot_url.settings
    PythonOption django.root /root_url
    PythonDebug On
    PythonPath "['D:/ws/django/myproject/'] + sys.path"
Options ExecCGI
Options +Indexes
Order allow,deny
Allow from all
</Location>

Any help is appreciated, and Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to