<commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from course_grader.views.api.sections import Sections
from course_grader.views.api.graderoster import GradeRoster, GradeRosterStatus
from course_grader.views.api.importgrades import ImportGrades
from course_grader.views.api.conversionscales import ConversionScales
from course_grader.views.api.submitted_graderoster import (
    SubmissionsByTerm, SubmittedGradeRoster)

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', 'course_grader.views.chooser.home'),
    url(r'^login/?$', 'course_grader.views.user_login'),
    url(r'^section/(?P<url_token>[^/]*)$',
        'course_grader.views.section.section'),
    url(r'^api/v1/sections/(?P<term_id>[^/]*)$', Sections().run),
    url(r'^api/v1/graderoster/(?P<section_id>[^/]*)$', GradeRoster().run),
    url(r'^api/v1/grading_status/(?P<section_id>[^/]*)$',
        GradeRosterStatus().run),
    url(r'^api/v1/import/(?P<section_id>[^/]*)$', ImportGrades().run),
    url(r'^api/v1/import/(?P<section_id>[^/]*)/(?P<import_id>[\d]*)$',
        ImportGrades().run),
    url(r'^api/v1/conversion_scales/(?P<scale>[a-z]*)$',
        ConversionScales().run),

    # support urls
    url(r'^support/status/?$', 'course_grader.views.support.status.status'),
    url(r'^support/search/?$',
        'course_grader.views.support.search.graderosters'),
    url(r'^support/imports/?$',
        'course_grader.views.support.search.grade_imports'),
    url(r'^api/v1/submitted_graderosters/(?P<term_id>[^/]*)$',
        SubmissionsByTerm().run, name="term_submissions"),
    url(r'^api/v1/submitted_graderoster/(?P<graderoster_id>[\d]*)$',
        SubmittedGradeRoster().run, name='submitted_graderoster'),
)

# debug routes for developing error pages
if settings.DEBUG:
    urlpatterns += patterns(
        '',
        (r'^404$', TemplateView.as_view(template_name='404.html')),
        (r'^500$', TemplateView.as_view(template_name='500.html')),
    )<commit_msg>updates urls for django 1.10<commit_after>from django.conf import settings
from django.conf.urls import url
from django.views.generic import TemplateView
from course_grader.views.api.sections import Sections
from course_grader.views.api.graderoster import GradeRoster, GradeRosterStatus
from course_grader.views.api.importgrades import ImportGrades
from course_grader.views.api.conversionscales import ConversionScales
from course_grader.views.api.submitted_graderoster import (
    SubmissionsByTerm, SubmittedGradeRoster)

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = [
    url(r'^$', 'course_grader.views.chooser.home'),
    url(r'^login/?$', 'course_grader.views.user_login'),
    url(r'^section/(?P<url_token>[^/]*)$',
        'course_grader.views.section.section'),
    url(r'^api/v1/sections/(?P<term_id>[^/]*)$', Sections().run),
    url(r'^api/v1/graderoster/(?P<section_id>[^/]*)$', GradeRoster().run),
    url(r'^api/v1/grading_status/(?P<section_id>[^/]*)$',
        GradeRosterStatus().run),
    url(r'^api/v1/import/(?P<section_id>[^/]*)$', ImportGrades().run),
    url(r'^api/v1/import/(?P<section_id>[^/]*)/(?P<import_id>[\d]*)$',
        ImportGrades().run),
    url(r'^api/v1/conversion_scales/(?P<scale>[a-z]*)$',
        ConversionScales().run),

    # support urls
    url(r'^support/status/?$', 'course_grader.views.support.status.status'),
    url(r'^support/search/?$',
        'course_grader.views.support.search.graderosters'),
    url(r'^support/imports/?$',
        'course_grader.views.support.search.grade_imports'),
    url(r'^api/v1/submitted_graderosters/(?P<term_id>[^/]*)$',
        SubmissionsByTerm().run, name="term_submissions"),
    url(r'^api/v1/submitted_graderoster/(?P<graderoster_id>[\d]*)$',
        SubmittedGradeRoster().run, name='submitted_graderoster'),
]

# debug routes for developing error pages
if settings.DEBUG:
    urlpatterns.extend([
        (r'^404$', TemplateView.as_view(template_name='404.html')),
        (r'^500$', TemplateView.as_view(template_name='500.html')),
    ])
{'fraction_non_alphanumeric': 0.18326693227091634, 'fraction_numerical': 0.010077337707991563, 'mean_word_length': 4.7753721244925575, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '4187531', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1482, 'n_words': 196}