<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf import settings
from django.conf.urls import include, url, patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from rest_framework.urlpatterns import format_suffix_patterns
from django.contrib.auth.decorators import login_required
from pola.views import FrontPageView

urlpatterns = [
    url(r'^$',
        TemplateView.as_view(template_name='pages/home.html'), name="home"),
    url(r'^cms/$', FrontPageView.as_view(), name="home-cms"),
    url(r'^about/$',
        TemplateView.as_view(template_name='pages/about.html'), name="about"),

    # Django Admin
    # url(r'^api/', include('api.urls', namespace='api')),
    url(r'^cms/pola/', include('pola.urls', namespace='pola')),
    url(r'^cms/product/', include('product.urls', namespace='product')),
    url(r'^cms/company/', include('company.urls', namespace='company')),
    url(r'^cms/report/', include('report.urls', namespace='report')),
    url(r'^grappelli/', include('grappelli.urls')), # grappelli URLS
    url(r'^admin/', include(admin.site.urls)),

    # User management
    url(r'^users/', include("pola-backend.users.urls", namespace="users")),
    url(r'^accounts/', include('allauth.urls')),

    # Your stuff: custom urls includes go here

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \
  + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

# api urls
apiurlpatterns = [
    url(r'^product/', include('product.api.urls', namespace='product')),
    url(r'^', include('pola.api.urls', namespace='pola'))
]

apiurlpatterns = format_suffix_patterns(apiurlpatterns)

urlpatterns += [url(r'^api/', include(apiurlpatterns, namespace='api'))]

# serving static files
urlpatterns += patterns(
    '', (r'^static/(?P<path>.*)$',
         'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
)

if settings.DEBUG:
    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r'^400/$', 'django.views.defaults.bad_request'),
        url(r'^403/$', 'django.views.defaults.permission_denied'),
        url(r'^404/$', 'django.views.defaults.page_not_found'),
        url(r'^500/$', 'django.views.defaults.server_error'),
    ]<commit_msg>Fix urls<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf import settings
from django.conf.urls import include, url, patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from rest_framework.urlpatterns import format_suffix_patterns
from pola.views import FrontPageView

urlpatterns = [
    url(r'^$',
        TemplateView.as_view(template_name='pages/home.html'), name="home"),
    url(r'^cms/$', FrontPageView.as_view(), name="home-cms"),
    url(r'^about/$',
        TemplateView.as_view(template_name='pages/about.html'), name="about"),

    # Django Admin
    # url(r'^api/', include('api.urls', namespace='api')),
    url(r'^cms/product/', include('product.urls', namespace='product')),
    url(r'^cms/company/', include('company.urls', namespace='company')),
    url(r'^cms/report/', include('report.urls', namespace='report')),
    url(r'^grappelli/', include('grappelli.urls')),  # grappelli URLS
    url(r'^admin/', include(admin.site.urls)),

    # User management
    url(r'^users/', include("pola-backend.users.urls", namespace="users")),
    url(r'^accounts/', include('allauth.urls')),

    # Your stuff: custom urls includes go here

]

# api urls
apiurlpatterns = [
    url(r'^product/', include('product.api.urls', namespace='product')),
    url(r'^', include('pola.api.urls', namespace='pola'))
]
apiurlpatterns = format_suffix_patterns(apiurlpatterns)
urlpatterns += [url(r'^api/', include(apiurlpatterns, namespace='api'))]

# serving static files
urlpatterns += patterns(
    '', (r'^static/(?P<path>.*)$',
         'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
)

if settings.DEBUG:

    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r'^400/$', 'django.views.defaults.bad_request'),
        url(r'^403/$', 'django.views.defaults.permission_denied'),
        url(r'^404/$', 'django.views.defaults.page_not_found'),
        url(r'^500/$', 'django.views.defaults.server_error'),
    ]
{'fraction_non_alphanumeric': 0.16955523073710588, 'fraction_numerical': 0.005429108373355606, 'mean_word_length': 4.695600475624257, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '601187', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1519, 'n_words': 298}