]> git.parisson.com Git - teleforma.git/commitdiff
change login url
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 8 Feb 2015 22:16:06 +0000 (23:16 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 8 Feb 2015 22:16:06 +0000 (23:16 +0100)
example/settings.py
teleforma/templates/telemeta/base.html
teleforma/urls.py

index d15831fd8370e9538be19dd90f0f97023b646e88..91c04581f270f641a51b13e2d14d22d441fceb9a 100644 (file)
@@ -180,7 +180,7 @@ TELEMETA_DEFAULT_GRAPHER_SIZES = ['360x130', '640x130']
 TELEMETA_DEFAULT_GRAPHER_ID = 'waveform_contour_wh'
 
 AUTH_PROFILE_MODULE = 'telemeta.userprofile'
-LOGIN_URL = '/login/'
+LOGIN_URL = '/accounts/login/'
 LOGIN_REDIRECT_URL = reverse_lazy('teleforma-desk')
 SESSION_EXPIRE_AT_BROWSER_CLOSE = False
 
@@ -215,5 +215,5 @@ SOUTH_MIGRATION_MODULES = {
 }
 
 SUIT_CONFIG = {
-    'ADMIN_NAME': 'TeleForma Admin'
+    'ADMIN_NAME': 'TeleForma Admin',
 }
\ No newline at end of file
index 679ecbe377e1df4c6bf4928f5214d50103615d91..a5305e4e94a768733569450facefc16fc279cb02 100644 (file)
@@ -102,7 +102,7 @@ alt="logo" />
   {% endif %}
 
  {% else %}
-  <li><a href="{% url teleforma-login %}" class="red">{% trans "Home" %}</a></li>
+  <li><a href="#accounts#" class="red">{% trans "Home" %}</a></li>
  {% endif %}
 
  {% if user.is_authenticated %}
@@ -132,8 +132,12 @@ alt="logo" />
 
  {% if user.is_authenticated %}
   {% if user.is_staff %}
-  <li><a href="{% url teleforma-users 0 0 0 %}" class="blue">{% trans "Users" %}</a></li>
-  <li><a href="{% url telemeta-admin-general %}" class="blue">{% trans "Admin" %}</a></li>
+  <li><a href="#admin#" class="blue">{% trans "Admin" %}</a>
+   <ul>
+    <li><a href="{% url telemeta-admin-general %}">{% trans "General" %}</a></li>
+    <li><a href="{% url teleforma-users 0 0 0 %}">{% trans "Users" %}</a></li>
+    </ul>
+  </li>
   {% else %}
    <li><a href="{% url teleforma-help %}" class="green">{% trans "Help" %}</a></li>
  {% endif %}
index 9c25ac821cb608c11f77448d853916196d111ed5..6bc830aea084e1cb8ef891cf50f79da7b868f84d 100644 (file)
@@ -52,8 +52,11 @@ urlpatterns = patterns('',
 
 
     # login
-    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html'},
+    url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html'},
         name="teleforma-login"),
+    # (r'^accounts/register0/$', RegistrationView.as_view(), {'form_class':CustomRegistrationForm}),
+    url(r'^accounts/register/$', UserAddView.as_view()),
+    url(r'^captcha/', include('captcha.urls')),
 
     # Help
     url(r'^help/$', HelpView.as_view(), name="teleforma-help"),
@@ -121,8 +124,5 @@ urlpatterns = patterns('',
     # EXAM
     url(r'^', include('teleforma.exam.urls')),
 
-    # (r'^accounts/register0/$', RegistrationView.as_view(), {'form_class':CustomRegistrationForm}),
-    url(r'^accounts/register/$', UserAddView.as_view()),
-    url(r'^captcha/', include('captcha.urls')),
 
 )