from django.conf.urls import include, url from django.contrib.auth import views from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic.base import TemplateView from .apps import AppConfig from .forms import LoginForm from .views import CasaLegislativaCrud, HelpView app_name = AppConfig.name urlpatterns = [ url(r'^sistema/', TemplateView.as_view(template_name='sistema.html')), url(r'^ajuda/(?P\w+)$', HelpView.as_view(), name='help_topic'), url(r'^ajuda/', TemplateView.as_view(template_name='ajuda/index.html'), name='help_base'), url(r'^casa_legislativa/', include(CasaLegislativaCrud.get_urls())), url(r'^login/$', views.login, { 'template_name': 'base/login.html', 'authentication_form': LoginForm}, name='login'), url(r'^logout/$', views.logout, {'next_page': '/login'}, name='logout') ] # Fix a static asset finding error on Django 1.9 + gunicorn: # http://stackoverflow.com/questions/35510373/ urlpatterns += staticfiles_urlpatterns()