Source

django-fitlog / fitlog / urls.py

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'),
)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.