Commits

Anonymous committed eea7203

remove direct_to_template

  • Participants
  • Parent commits 691bae1
  • Branches django-1.5

Comments (0)

Files changed (1)

File fitlog/urls.py

-from django.conf.urls.defaults import *
-from django.views.generic.simple import direct_to_template
+from django.conf.urls import patterns, url
+from django.views.generic import TemplateView
 
 from fitlog import views
 
-urlpatterns = patterns('',
-     url(r'^/?$', views.home, name="home"),
-     url(r'^my-logs/$', views.mylogs, name="my_logs"),
-     url(r'^add-fitlog/$', views.add_log, name="add_log"),
-     url(r'^add-bodyweight-log/$', views.add_bodyweight_log, name="add_bodyweight_log"),
-     url(r'^bodyweight-log/$', views.bodyweight_log, name="bodyweight_log"),
-     url(r'^edit-fitlog/(?P<fitlog_id>\w+)$', views.edit_fitlog, name="edit_fitlog"),
-     url(r'^add-cardio/(?P<fitlog_id>\w+)$', views.add_cardio, name='add_cardio'),
-     url(r'^add-weight-training/(?P<fitlog_id>\w+)$', views.add_weight_training_log, name='add_weight_training_log'),
-     url(r'^fitlog/(?P<fitlog_id>\w+)$', views.view_fitlog, name='view_fitlog'),
-     url(r'^changelog/$', direct_to_template, {'template' : 'fitlog/changelog.html'}, name='changelog'),
+
+urlpatterns = patterns(
+    '',
+    url(r'^/?$', views.home, name="home"),
+    url(r'^my-logs/$', views.mylogs, name="my_logs"),
+    url(r'^add-fitlog/$', views.add_log, name="add_log"),
+    url(r'^add-bodyweight-log/$', views.add_bodyweight_log,
+        name="add_bodyweight_log"),
+    url(r'^bodyweight-log/$', views.bodyweight_log, name="bodyweight_log"),
+    url(r'^edit-fitlog/(?P<fitlog_id>\w+)$', views.edit_fitlog,
+         name="edit_fitlog"),
+    url(r'^add-cardio/(?P<fitlog_id>\w+)$', views.add_cardio,
+         name='add_cardio'),
+    url(r'^add-weight-training/(?P<fitlog_id>\w+)$',
+         views.add_weight_training_log, name='add_weight_training_log'),
+    url(r'^fitlog/(?P<fitlog_id>\w+)$', views.view_fitlog,
+         name='view_fitlog'),
+    url(r'^changelog/$', TemplateView.as_view(
+         template_name='fitlog/changelog.html'), name='changelog'),
 )