Alex Rivera | Logout

Django - use reverse url mapping in settings

Asked 2009-10-05T04:40:49.307
44

A few of the options in the django settings file are urls, for example LOGIN_URL and LOGIN_REDIRECT_URL. Is it possible to avoid hardcoding these urls, and instead use reverse url mapping? At the moment this is really the only place where I find myself writing the same urls in multiple places.

Edit
Report

1 Answer

14

In django development version reverse_lazy() becomes an option: https://docs.djangoproject.com/en/dev/ref/urlresolvers/#reverse-lazy

answered 2012-01-09T15:42:51.800

Your Answer