<commit_before>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django_cradmin import crinstance

from devilry.devilry_student.cradmin_group.projectgroupapp import GroupInviteRespondView
from devilry.devilry_student.cradmin_student import cradmin_student
from devilry.devilry_student.cradmin_period import cradmin_period
from devilry.devilry_student.cradmin_group import cradmin_group
from .views.download_deliveryfiles import CompressedFileDownloadView
from .views.download_deliveryfiles import FileDownloadView


@login_required
def emptyview(request):
    from django.http import HttpResponse
    return HttpResponse('Logged in')


@login_required
def redirect_to_student_frontpage_view(request):
    return redirect(crinstance.reverse_cradmin_url(
        instanceid='devilry_student',
        appname='waitingfordeliveries',
        roleid=request.user.id))


urlpatterns = patterns(
    'devilry.devilry_student',
    url('^$', redirect_to_student_frontpage_view, name='devilry_student'),

    url('^rest/', include('devilry.devilry_student.rest.urls')),
    url('^emptytestview', emptyview),  # NOTE: Only used for testing

    url(r'^groupinvite/respond/(?P<invite_id>\d+)$',
        login_required(GroupInviteRespondView.as_view()),
        name='devilry_student_groupinvite_respond'),

    url(r'^show-delivery/filedownload/(?P<filemetaid>\d+)$',
        login_required(FileDownloadView.as_view()),
        name='devilry-delivery-file-download'),
    url(r'^show-delivery/compressedfiledownload/(?P<deliveryid>\d+)$',
        login_required(CompressedFileDownloadView.as_view()),
        name='devilry-delivery-download-all-zip'),

    url(r'^show_delivery/(?P<delivery_id>\d+)$', 'views.show_delivery.show_delivery',
        name='devilry_student_show_delivery'),

    url(r'^period/', include(cradmin_period.CrAdminInstance.urls())),
    url(r'^group/', include(cradmin_group.CrAdminInstance.urls())),
    url(r'^', include(cradmin_student.CrAdminInstance.urls()))
)
<commit_msg>devilry_student: Removed the empty test view used by the old ExtJS UI.<commit_after>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django_cradmin import crinstance

from devilry.devilry_student.cradmin_group.projectgroupapp import GroupInviteRespondView
from devilry.devilry_student.cradmin_student import cradmin_student
from devilry.devilry_student.cradmin_period import cradmin_period
from devilry.devilry_student.cradmin_group import cradmin_group
from .views.download_deliveryfiles import CompressedFileDownloadView
from .views.download_deliveryfiles import FileDownloadView


@login_required
def redirect_to_student_frontpage_view(request):
    return redirect(crinstance.reverse_cradmin_url(
        instanceid='devilry_student',
        appname='waitingfordeliveries',
        roleid=request.user.id))


urlpatterns = patterns(
    'devilry.devilry_student',
    url('^$', redirect_to_student_frontpage_view, name='devilry_student'),

    url('^rest/', include('devilry.devilry_student.rest.urls')),

    url(r'^groupinvite/respond/(?P<invite_id>\d+)$',
        login_required(GroupInviteRespondView.as_view()),
        name='devilry_student_groupinvite_respond'),

    url(r'^show-delivery/filedownload/(?P<filemetaid>\d+)$',
        login_required(FileDownloadView.as_view()),
        name='devilry-delivery-file-download'),
    url(r'^show-delivery/compressedfiledownload/(?P<deliveryid>\d+)$',
        login_required(CompressedFileDownloadView.as_view()),
        name='devilry-delivery-download-all-zip'),

    url(r'^show_delivery/(?P<delivery_id>\d+)$', 'views.show_delivery.show_delivery',
        name='devilry_student_show_delivery'),

    url(r'^period/', include(cradmin_period.CrAdminInstance.urls())),
    url(r'^group/', include(cradmin_group.CrAdminInstance.urls())),
    url(r'^', include(cradmin_student.CrAdminInstance.urls()))
)

{'fraction_non_alphanumeric': 0.11779201577131591, 'fraction_numerical': 0.0, 'mean_word_length': 5.868020304568528, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1760585', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1299, 'n_words': 180}