]> git.parisson.com Git - teleforma.git/commitdiff
fix testimonial dates, add longerusername in login
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 12 Jun 2013 19:40:52 +0000 (21:40 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 12 Jun 2013 19:40:52 +0000 (21:40 +0200)
teleforma/models/pro.py
teleforma/templates/teleforma/seminar_testimonial.html
teleforma/urls.py

index 9a32ec9c55e2c13d31e1ad436c75e16c1826a4ab..897a97627717b8c66d7327ddaa465665fbe26a60 100755 (executable)
@@ -310,5 +310,5 @@ class SeminarRevision(models.Model):
         db_table = app_label + '_' + 'seminar_revisions'
         verbose_name = _('Seminar revision')
         verbose_name_plural = _('Seminar revisions')
-        ordering = ['date_modified','-date']
+        ordering = ['-date_modified']
 
index 4030998f223ea21a26593cf90488b859f0eea127..7c4b0764801692a96385655598412d38ecbc4580 100644 (file)
@@ -38,7 +38,7 @@
       <tr><td class="bold">{% trans "Course" %} : </td><td>{{ seminar.course }}</td></tr>
       <tr><td class="bold">{% trans "Training type" %} : </td><td>E-learning</td></tr>
       <tr><td class="bold">{% trans "Duration" %} : </td><td>{{ seminar.duration|hours }} {% trans "hours" %}</td></tr>
-      <tr><td class="bold">{% trans "Training begin date" %} : </td><td>{{ first_revision.date|date:'j F Y' }}</td></tr>
+      <tr><td class="bold">{% trans "Training begin date" %} : </td><td>{% if first_revision.date_modified %}{{ first_revision.date_modified|date:'j F Y' }}{% else %}{{ first_revision.date|date:'j F Y' }}{% endif %}</td></tr>
       <tr><td class="bold">{% trans "Training end date" %} : </td><td>{% if testimonial.date_modified %}{{ testimonial.date_modified|date:'j F Y' }}{% else %}{{ testimonial.date_added|date:'j F Y' }}{% endif %}</td></tr>
     </table>
 
index 596dc94c7821d47cc26ecebe60d6261a16f64c8a..0e3306829778d32a8e3a8e0716ae0d0e029f9685 100644 (file)
@@ -41,6 +41,7 @@ from teleforma.views import *
 from telemeta.views import *
 import forms_builder.forms.urls
 from jsonrpc import jsonrpc_site
+from longerusername.forms import AuthenticationForm
 
 htdocs_forma = os.path.dirname(__file__) + '/static/teleforma/'
 user_export = UsersXLSExport()
@@ -50,10 +51,11 @@ media = MediaView()
 
 urlpatterns = patterns('',
 #    url(r'^$', HomeView.as_view(), name='teleforma-home'),
-    url(r'^$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html'},
+    url(r'^$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html', 'authentication_form': AuthenticationForm },
         name="teleforma-login"),
-    url(r'^$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html'},
+    url(r'^$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html', 'authentication_form': AuthenticationForm },
         name="home"),
+#    url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'authentication_form': AuthenticationForm}),
 
     # Telemeta
     url(r'^', include('telemeta.urls')),