mybuddy/babybuddy/urls.py

36 lines
1.1 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
2017-08-11 18:32:02 +00:00
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
2017-08-11 18:32:02 +00:00
from django.contrib import admin
2017-11-09 12:24:32 +00:00
from django.contrib.auth import views as auth_views
from . import views
2017-08-11 18:32:02 +00:00
urlpatterns = [
url(r'^admin/', admin.site.urls),
2017-11-09 12:24:32 +00:00
url(r'^login/$', auth_views.LoginView.as_view(), name='login'),
url(r'^logout/$', auth_views.LogoutView.as_view(), name='logout'),
url('^password_reset/$', auth_views.PasswordResetView.as_view(),
name='password_reset',),
2017-11-09 12:24:32 +00:00
url(r'^$', views.RootRouter.as_view(), name='root-router'),
url(r'^welcome/$', views.Welcome.as_view(), name='welcome'),
2017-11-11 22:27:42 +00:00
url(r'^user/settings/$', views.UserSettings.as_view(),
name='user-settings'),
2017-11-09 12:24:32 +00:00
url(r'', include('api.urls', namespace='api')),
2017-08-15 19:14:03 +00:00
url(r'', include('core.urls')),
2017-08-18 13:02:31 +00:00
url(r'', include('dashboard.urls')),
2017-08-24 19:40:11 +00:00
url(r'', include('reports.urls', namespace='reports')),
2017-08-11 18:32:02 +00:00
]
if settings.DEBUG:
2017-11-18 09:29:46 +00:00
urlpatterns += static(
settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT
)