<commit_before>from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseBadRequest, HttpResponsePermanentRedirect
from django_cradmin.superuserui import superuserui_registry

from devilry.devilry_frontpage import crinstance_frontpage

admin.site.login = login_required(admin.site.login)


def redirecto_to_show_delivery(request, assignmentgroupid):
    delivery_id = request.GET.get('deliveryid')
    if not delivery_id:
        return HttpResponseBadRequest(
            'Requires <code>deliveryid</code> in QUERYSTRING. Perhaps you did not '
            'paste the entire URL from your email?')
    return HttpResponsePermanentRedirect(
        reverse('devilry_student_show_delivery', kwargs={'delivery_id': delivery_id}))


devilry_urls = [
    url(r'^markup/', include('devilry.devilry_markup.urls')),
    url(r'^authenticate/', include('devilry.devilry_authenticate.urls')),
    url(r'^devilry_resetpassword/', include('devilry.devilry_resetpassword.urls')),
    url(r'^cradmin_temporaryfileuploadstore/', include('django_cradmin.apps.cradmin_temporaryfileuploadstore.urls')),

    url(r'^account/', include('devilry.devilry_account.urls')),
    url(r'^devilry_help/', include('devilry.devilry_help.urls')),
    url(r'^devilry_core/', include('devilry.apps.core.urls')),
    url(r'^devilry_settings/', include('devilry.devilry_settings.urls')),
    url('r^student/assignmentgroup/(?P<assignmentgroupid>\d+)$', redirecto_to_show_delivery),
    url(r'^devilry_student/', include('devilry.devilry_student.urls')),
    url(r'^devilry_group/', include('devilry.devilry_group.urls')),
    url(r'^devilry_gradeform/', include('devilry.devilry_gradeform.urls')),
    url(r'^devilry_admin/', include('devilry.devilry_admin.urls')),
    url(r'^djangoadmin/', include(admin.site.urls)),
    url(r'^superuser/', include(superuserui_registry.default.make_cradmin_instance_class().urls())),
    url(r'^devilry_send_email_to_students/', include('devilry.devilry_send_email_to_students.urls')),
    url(r'^devilry_header/', include('devilry.devilry_header.urls')),
    url(r'^devilry_bulkcreate_users/', include('devilry.devilry_bulkcreate_users.urls')),
    url(r'^devilry_examiner/', include('devilry.devilry_examiner.urls')),
    url(r'^devilry_detektor/', include('devilry.devilry_detektor.urls')),
    url(r'^', include(crinstance_frontpage.CrAdminInstance.urls())),
    # url(r'^devilry_qualifiesforexam/', include('devilry.devilry_qualifiesforexam.urls')),
    # url(r'^devilry_qualifiesforexam_approved/', include('devilry.devilry_qualifiesforexam_approved.urls')),
    # url(r'^devilry_qualifiesforexam_points/', include('devilry.devilry_qualifiesforexam_points.urls')),
    # url(r'^devilry_qualifiesforexam_select/', include('devilry.devilry_qualifiesforexam_select.urls')),<commit_msg>core: Remove devilry_send_email_to_students from urls.<commit_after>from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseBadRequest, HttpResponsePermanentRedirect
from django_cradmin.superuserui import superuserui_registry

from devilry.devilry_frontpage import crinstance_frontpage

admin.site.login = login_required(admin.site.login)


def redirecto_to_show_delivery(request, assignmentgroupid):
    delivery_id = request.GET.get('deliveryid')
    if not delivery_id:
        return HttpResponseBadRequest(
            'Requires <code>deliveryid</code> in QUERYSTRING. Perhaps you did not '
            'paste the entire URL from your email?')
    return HttpResponsePermanentRedirect(
        reverse('devilry_student_show_delivery', kwargs={'delivery_id': delivery_id}))


devilry_urls = [
    url(r'^markup/', include('devilry.devilry_markup.urls')),
    url(r'^authenticate/', include('devilry.devilry_authenticate.urls')),
    url(r'^devilry_resetpassword/', include('devilry.devilry_resetpassword.urls')),
    url(r'^cradmin_temporaryfileuploadstore/', include('django_cradmin.apps.cradmin_temporaryfileuploadstore.urls')),

    url(r'^account/', include('devilry.devilry_account.urls')),
    url(r'^devilry_help/', include('devilry.devilry_help.urls')),
    url(r'^devilry_core/', include('devilry.apps.core.urls')),
    url(r'^devilry_settings/', include('devilry.devilry_settings.urls')),
    url('r^student/assignmentgroup/(?P<assignmentgroupid>\d+)$', redirecto_to_show_delivery),
    url(r'^devilry_student/', include('devilry.devilry_student.urls')),
    url(r'^devilry_group/', include('devilry.devilry_group.urls')),
    url(r'^devilry_gradeform/', include('devilry.devilry_gradeform.urls')),
    url(r'^devilry_admin/', include('devilry.devilry_admin.urls')),
    url(r'^djangoadmin/', include(admin.site.urls)),
    url(r'^superuser/', include(superuserui_registry.default.make_cradmin_instance_class().urls())),
    url(r'^devilry_header/', include('devilry.devilry_header.urls')),
    url(r'^devilry_bulkcreate_users/', include('devilry.devilry_bulkcreate_users.urls')),
    url(r'^devilry_examiner/', include('devilry.devilry_examiner.urls')),
    url(r'^devilry_detektor/', include('devilry.devilry_detektor.urls')),
    url(r'^', include(crinstance_frontpage.CrAdminInstance.urls())),
    # url(r'^devilry_qualifiesforexam/', include('devilry.devilry_qualifiesforexam.urls')),
    # url(r'^devilry_qualifiesforexam_approved/', include('devilry.devilry_qualifiesforexam_approved.urls')),
    # url(r'^devilry_qualifiesforexam_points/', include('devilry.devilry_qualifiesforexam_points.urls')),
    # url(r'^devilry_qualifiesforexam_select/', include('devilry.devilry_qualifiesforexam_select.urls')),
{'fraction_non_alphanumeric': 0.1417644059153493, 'fraction_numerical': 0.0, 'mean_word_length': 6.752305665349144, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1198292', 'n_tokens_mistral': 2114, 'n_tokens_neox': 2111, 'n_words': 233}