# Path: apps/views.py
# class PlainTextView(TemplateView):
#     def render_to_response(self, context, **kwargs):
#         return super().render_to_response(context, content_type='text/plain', **kwargs)


from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import RedirectView
from apps.views import PlainTextView
# -*- coding: utf-8 -*-



urlpatterns = [
    # Temporary redirect to Twitch channel.
    url(r'^$', name='site-home', view=RedirectView.as_view(url='http://twitch.tv/avalonstar', permanent=False)),

    # Core Modules.
    url(r'^', include('apps.broadcasts.urls')),
    url(r'^', include('apps.games.urls')),
    url(r'^api/', include('apps.api.urls', namespace='api')),
    url(r'^live/', include('apps.live.urls', namespace='live')),

    # Administration Modules.
    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/', include(admin.site.urls)),

    # Sitemaps, Favicons, Robots, and Humans.

# Path: apps/views.py
# class PlainTextView(TemplateView):
#     def render_to_response(self, context, **kwargs):
#         return super().render_to_response(context, content_type='text/plain', **kwargs)


# Path: avalonstar/urls.py
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import RedirectView
from apps.views import PlainTextView

# -*- coding: utf-8 -*-



urlpatterns = [
    # Temporary redirect to Twitch channel.
    url(r'^$', name='site-home', view=RedirectView.as_view(url='http://twitch.tv/avalonstar', permanent=False)),

    # Core Modules.
    url(r'^', include('apps.broadcasts.urls')),
    url(r'^', include('apps.games.urls')),
    url(r'^api/', include('apps.api.urls', namespace='api')),
    url(r'^live/', include('apps.live.urls', namespace='live')),

    # Administration Modules.
    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/', include(admin.site.urls)),

    # Sitemaps, Favicons, Robots, and Humans.

    url(r'^favicon.ico$', name='favicon', view=RedirectView.as_view(url=settings.STATIC_URL + 'images/favicon.ico', permanent=True)),