# Path: sso/views.py
# class DocView(TemplateView):
#     template_name = 'sso/5-minutes-doc.html'
#     tabs = [TabNav(tab[0], tab[1], tab[2], 'doc', tab[0] == 'basic') for tab in tabs_list]
# 
#     def get_context_data(self, **kwargs):
#         context = super(DocView, self).get_context_data(**kwargs)
#         context['login_js_url'] = static('widget/js/login.min.js')
#         context['Message_ID'] = make_msgid()
#         context['SORTED_DISCIPLINES'] = SORTED_DISCIPLINES
#         context['DEGREES'] = DEGREES
#         context['HOSTELS'] = HOSTELS
#         context['SEXES'] = SEXES
#         context['USER_TYPES'] = UserProfile.objects.values_list('type').distinct()
# 
#         # Mark all tabs as inactive
#         for tab_ in self.tabs:
#             tab_.is_active = False
# 
#         tab = context.get('tab', '')
#         for tab_ in self.tabs:
#             if tab == tab_.tab_name:
#                 tab = tab_
#                 break
#         else:
#             tab = self.tabs[0]
#         tab.is_active = True
#         context['tabs'] = self.tabs
#         context['active_tab'] = tab
#         return context
# 
# class IndexView(TemplateView):
#     template_name = 'sso/index.html'
# 
#     def get(self, request, *args, **kwargs):
#         context = self.get_context_data(**kwargs)
#         if request.user.is_authenticated():
#             context['base_template'] = 'sso/logged_in.html'
#         else:
#             context['base_template'] = 'sso/root.html'
# 
#         return self.render_to_response(context)


import re
import oauth2_provider.urls
import account.urls
import application.urls
import resources.urls
import user_resource.urls
import widget.urls
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
from .views import DocView, IndexView
"""sso 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))
"""




urlpatterns = [

# Path: sso/views.py
# class DocView(TemplateView):
#     template_name = 'sso/5-minutes-doc.html'
#     tabs = [TabNav(tab[0], tab[1], tab[2], 'doc', tab[0] == 'basic') for tab in tabs_list]
# 
#     def get_context_data(self, **kwargs):
#         context = super(DocView, self).get_context_data(**kwargs)
#         context['login_js_url'] = static('widget/js/login.min.js')
#         context['Message_ID'] = make_msgid()
#         context['SORTED_DISCIPLINES'] = SORTED_DISCIPLINES
#         context['DEGREES'] = DEGREES
#         context['HOSTELS'] = HOSTELS
#         context['SEXES'] = SEXES
#         context['USER_TYPES'] = UserProfile.objects.values_list('type').distinct()
# 
#         # Mark all tabs as inactive
#         for tab_ in self.tabs:
#             tab_.is_active = False
# 
#         tab = context.get('tab', '')
#         for tab_ in self.tabs:
#             if tab == tab_.tab_name:
#                 tab = tab_
#                 break
#         else:
#             tab = self.tabs[0]
#         tab.is_active = True
#         context['tabs'] = self.tabs
#         context['active_tab'] = tab
#         return context
# 
# class IndexView(TemplateView):
#     template_name = 'sso/index.html'
# 
#     def get(self, request, *args, **kwargs):
#         context = self.get_context_data(**kwargs)
#         if request.user.is_authenticated():
#             context['base_template'] = 'sso/logged_in.html'
#         else:
#             context['base_template'] = 'sso/root.html'
# 
#         return self.render_to_response(context)


# Path: sso/urls.py
import re
import oauth2_provider.urls
import account.urls
import application.urls
import resources.urls
import user_resource.urls
import widget.urls
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
from .views import DocView, IndexView

"""sso 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))
"""




urlpatterns = [

    url(r'^$', IndexView.as_view(), name='index'),