Permalink
Browse files

rename urls to use underscores, not dashes

  • Loading branch information...
1 parent 8327862 commit 2e570e9bb48eac77acf4aadab8825c863e42bcc3 @snarlygoster committed May 20, 2012
Showing with 14 additions and 13 deletions.
  1. +10 −10 templates/timeclock/clockpunchsums.html
  2. +2 −1 timeclock/urls.py
  3. +2 −2 timeclock/views.py
View
20 templates/timeclock/clockpunchsums.html
@@ -9,16 +9,16 @@
</head>
<body>
-<table>
-{% for line in work_periods %}
- <tr>
- <td>{{ line.ticket }} </td>
- <td>{{ line.worker }}</td>
- <td>{{ line.job }}</td>
- <td>{{ line.duration }}</td>
- </tr>
-{% endfor %}
-</table>
+ <table>
+ {% for line in work_periods %}
+ <tr>
+ <td>{{ line.ticket }} </td>
+ <td>{{ line.worker }}</td>
+ <td>{{ line.job }}</td>
+ <td>{{ line.duration }}</td>
+ </tr>
+ {% endfor %}
+ </table>
</body>
</html>
View
3 timeclock/urls.py
@@ -5,10 +5,11 @@
from timeclock.views import ClockPunchView, ClockPunchSums, WorkPeriodView
urlpatterns = patterns('',
- url(r'^$', ClockPunchView.as_view(), name='clockpunch-view'),
+ url(r'^$', ClockPunchView.as_view(), name='clockpunch_view'),
url(r'summary', ClockPunchSums.as_view(), name='clockpunchsums'),
url(r'workperiods/(?P<workername>\w*)/$', WorkPeriodView.as_view(), name='workperiods'),
url(r'workperiods/(?P<workername>\w*)/(?P<startdate>\d{8}/$)', WorkPeriodView.as_view(), name='workperiod_startdate'),
+ url(r'worker/$', WorkerSums.as_view(), name='worker_view'),
# Examples:
# url(r'^$', 'jobclockproj.views.home', name='home'),
# url(r'^jobclockproj/', include('jobclockproj.foo.urls')),
View
4 timeclock/views.py
@@ -25,9 +25,9 @@ def get_context_data(self, **kwargs):
context['last_ten_punches'] = [ {'worker': p.worker.name, 'job' : p.activity.ticket , 'tstamp': p.timestamp} for p in last_ten_punches ]
return context
-# success_url = reverse_lazy('clockpunch-view')
+# success_url = reverse_lazy('clockpunch_view')
def get_success_url(self):
- return reverse('clockpunch-view')
+ return reverse('clockpunch_view')
def form_valid(self,form):
form.save()

0 comments on commit 2e570e9

Please sign in to comment.