=== modified file 'django/contrib/auth/__init__.py'
--- django/contrib/auth/__init__.py	2006-12-19 04:35:09 +0000
+++ django/contrib/auth/__init__.py	2007-01-18 01:42:17 +0000
@@ -1,8 +1,10 @@
+from django.conf import settings
 from django.core.exceptions import ImproperlyConfigured
 
 SESSION_KEY = '_auth_user_id'
 BACKEND_SESSION_KEY = '_auth_user_backend'
-LOGIN_URL = '/accounts/login/'
+LOGIN_URL = getattr(settings, 'LOGIN_URL', '/accounts/login/')
+ACCOUNT_URL = getattr(settings, 'ACCOUNT_URL', '/accounts/profile/')
 REDIRECT_FIELD_NAME = 'next'
 
 def load_backend(path):

=== modified file 'django/contrib/auth/views.py'
--- django/contrib/auth/views.py	2006-12-19 04:35:09 +0000
+++ django/contrib/auth/views.py	2007-01-18 01:43:37 +0000
@@ -6,7 +6,7 @@
 from django.contrib.sites.models import Site
 from django.http import HttpResponseRedirect
 from django.contrib.auth.decorators import login_required
-from django.contrib.auth import LOGIN_URL, REDIRECT_FIELD_NAME
+from django.contrib.auth import LOGIN_URL, ACCOUNT_URL, REDIRECT_FIELD_NAME
 
 def login(request, template_name='registration/login.html'):
     "Displays the login form and handles the login action."
@@ -17,7 +17,7 @@
         if not errors:
             # Light security check -- make sure redirect_to isn't garbage.
             if not redirect_to or '://' in redirect_to or ' ' in redirect_to:
-                redirect_to = '/accounts/profile/'
+                redirect_to = ACCOUNT_URL
             from django.contrib.auth import login
             login(request, manipulator.get_user())
             request.session.delete_test_cookie()

=== modified file 'docs/authentication.txt'
--- docs/authentication.txt	2006-12-19 04:35:09 +0000
+++ docs/authentication.txt	2007-01-19 17:27:23 +0000
@@ -377,14 +377,15 @@
 
 ``login_required`` does the following:
 
-    * If the user isn't logged in, redirect to ``/accounts/login/``, passing
-      the current absolute URL in the query string as ``next``. For example:
+    * If the user isn't logged in, redirect to ``"settings.LOGIN_URL"`` 
+      (``"/accounts/login/"`` by default), passing the current absolute URL
+      in the query string as ``next``. For example:
       ``/accounts/login/?next=/polls/3/``.
     * If the user is logged in, execute the view normally. The view code is
       free to assume the user is logged in.
 
-Note that you'll need to map the appropriate Django view to ``/accounts/login/``.
-To do this, add the following line to your URLconf::
+Note that you'll need to map the appropriate Django view to ``"settings.LOGIN_URL"``.
+For example, using the defaults, add the following line to your URLconf::
 
     (r'^accounts/login/$', 'django.contrib.auth.views.login'),
 
@@ -395,8 +396,8 @@
 
     * If called via ``POST``, it tries to log the user in. If login is
       successful, the view redirects to the URL specified in ``next``. If
-      ``next`` isn't provided, it redirects to ``/accounts/profile/`` (which is
-      currently hard-coded). If login isn't successful, it redisplays the login
+      ``next`` isn't provided, it redirects to ``"settings.ACCOUNT_URL"`` which 
+      defaults to ``/accounts/profile/``. If login isn't successful, it redisplays the login
       form.
 
 It's your responsibility to provide the login form in a template called

=== modified file 'docs/settings.txt'
--- docs/settings.txt	2007-01-03 23:43:22 +0000
+++ docs/settings.txt	2007-01-19 17:27:23 +0000
@@ -166,6 +166,15 @@
         'news.Story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug),
     }
 
+ACCOUNT_URL
+-------------
+
+Default: ``'/accounts/profile/'``
+
+The URL where requests are redirected after login when the ``"contrib.auth.login"`` view
+gets no ``next`` parameter. 
+i.e.: When the `@login_required`_ decorator is called
+
 ADMIN_FOR
 ---------
 
@@ -533,6 +542,14 @@
 you'll have to remember to wrap the languages in the *real* ``gettext()`` in
 any code that uses ``LANGUAGES`` at runtime.
 
+LOGIN_URL
+-------------
+
+Default: ``'/accounts/login/'``
+
+The URL where requests are redirected for login, specially when using the
+`@login_required`_ decorator.
+
 MANAGERS
 --------
 
@@ -967,3 +984,5 @@
 
 It boils down to this: Use exactly one of either ``configure()`` or
 ``DJANGO_SETTINGS_MODULE``. Not both, and not neither.
+
+.. _@login_required: http://www.djangoproject.com/documentation/authentication/#the-login-required-decorator

