""" URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin

#import rest.views
import courses.views
import django.contrib.auth.views
import frontend.views

app_name="oer"

urlpatterns = [
    # index, general
    url(r'^$', frontend.views.index, name='index'),
    url(r'^dashboard/$', frontend.views.dashboard, name='dashboard'),
    url(r'^settings/$', frontend.views.settings, name='settings'),
    url(r'^attribution/$', frontend.views.attribution, name='attribution'),
    url(r'^privacy/$', frontend.views.privacy, name='privacy'),

    # Courses
    url(r'^courses/', include('courses.urls', namespace='courses')),

    # Playground / Notebook
    #url(r'^playground/', include('playground.urls')),

    # User Settings + Profile
    #url(r'^settings/', include('settings.urls')),
    #url(r'^dashboard/', include('dashboard.urls')),   # stats etc? -> index?

    # APIs
    url(r'^api/rest/', include('rest.urls', namespace='rest')),

    # Admin (also course managment?)
    #url(r'^admin/', include(admin.site.urls)),

    # allow social media users
    url('', include('social.apps.django_app.urls', namespace='social')),


    url(r'^accounts/login/$', django.contrib.auth.views.login, {'template_name': 'admin/login.html'}),
    url(r'^accounts/logout/$', django.contrib.auth.views.logout),

]
