from django.conf.urls import include, url, patterns
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from . import views
from django.contrib.auth import views as auth_views
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from material.frontend import urls as frontend_urls

urlpatterns = patterns('',
    url(r'^$', login_required(views.HomePage.as_view())),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/',
        include('registration.backends.default.urls')),
    url(r'', include(frontend_urls)),

    url(r'^accounts/profile',
        TemplateView.as_view(template_name='profile.html'),
        name='profile'),

    url(r'^login/',
        auth_views.login,
        name='login'),
)
