Dec 18, 2011

Avoid hardcoding urls

from django.conf import settings

urlpatterns=('',
    ...
    url('^%s$' %settings.LOGIN_URL[1:], 'django.contrib.auth.views.login', 
        name="login")
    ...
)

No comments: