fix LOGIN_URL setting
authorSofia Papagiannaki <papagian@gmail.com>
Mon, 6 Feb 2012 15:12:56 +0000 (17:12 +0200)
committerSofia Papagiannaki <papagian@gmail.com>
Mon, 6 Feb 2012 15:12:56 +0000 (17:12 +0200)
Refs: #1997

astakos/im/settings.py
astakos/im/views.py
astakos/settings.py

index 42db7ae..96e1446 100644 (file)
@@ -40,9 +40,6 @@ FORCE_PROFILE_UPDATE = getattr(settings, 'ASTAKOS_FORCE_PROFILE_UPDATE', True)
 #Enable invitations
 INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', True)
 
-# The URL where requests are redirected for login, especially when using the login_required() decorator.
-LOGIN_URL = getattr(settings, 'ASTAKOS_LOGIN_URL', '/im')
-
 COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
 COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None)
 
index c0e43c3..f813295 100644 (file)
@@ -155,7 +155,7 @@ def invite(request, template_name='im/invitations.html', extra_context={}):
     The view uses commit_manually decorator in order to ensure the number of the
     user invitations is going to be updated only if the email has been successfully sent.
     
-    If the user isn't logged in, redirects to settings.ASTAKOS_LOGIN_URL.
+    If the user isn't logged in, redirects to settings.LOGIN_URL.
     
     **Arguments**
     
@@ -175,8 +175,8 @@ def invite(request, template_name='im/invitations.html', extra_context={}):
     The view expectes the following settings are defined:
     
     * LOGIN_URL: login uri
-    * DEFAULT_CONTACT_EMAIL: service support email
-    * DEFAULT_FROM_EMAIL: from email
+    * ASTAKOS_DEFAULT_CONTACT_EMAIL: service support email
+    * ASTAKOS_DEFAULT_FROM_EMAIL: from email
     """
     status = None
     message = None
@@ -230,7 +230,7 @@ def edit_profile(request, template_name='im/profile.html', extra_context={}):
     In case of POST updates the user informantion and redirects to ``next``
     url parameter if exists.
     
-    If the user isn't logged in, redirects to settings.ASTAKOS_LOGIN_URL.  
+    If the user isn't logged in, redirects to settings.LOGIN_URL.
     
     **Arguments**
     
@@ -347,7 +347,7 @@ def send_feedback(request, template_name='im/feedback.html', email_template_name
     In case of GET request renders a form for providing the feedback information.
     In case of POST sends an email to support team.
     
-    If the user isn't logged in, redirects to settings.ASTAKOS_LOGIN_URL.  
+    If the user isn't logged in, redirects to settings.LOGIN_URL.
     
     **Arguments**
     
@@ -365,7 +365,7 @@ def send_feedback(request, template_name='im/feedback.html', email_template_name
     **Settings:**
     
     * LOGIN_URL: login uri
-    * DEFAULT_CONTACT_EMAIL: List of feedback recipients
+    * ASTAKOS_DEFAULT_CONTACT_EMAIL: List of feedback recipients
     """
     if request.method == 'GET':
         form = FeedbackForm()
index ae27f0a..23871dc 100644 (file)
@@ -124,4 +124,7 @@ LOGFILE = None
 USE_X_FORWARDED_HOST = False
 
 # Set umask (needed for gunicorn setup).
-#umask(0077)
\ No newline at end of file
+#umask(0077)
+
+# The URL where requests are redirected for login, especially when using the login_required() decorator.
+LOGIN_URL = '/im'
\ No newline at end of file