Source

django-fitlog / fitlog / urls.py

Full commit
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from django.contrib.auth import views as auth_views

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/$', TemplateView.as_view(
         template_name='fitlog/changelog.html'), name='changelog'),
)

# for login/logout
urlpatterns += patterns(
    '',
    url(r'^login/$', auth_views.login, {'template_name': 'login.html'},
        name='auth_login'),
    url(r'^logout/$', auth_views.logout, {'template_name': 'logout.html'},
        name='auth_logout'),
)