# Path: harnas/contest/views/contest.py
# def index(request):
# def details(request, contest_id):
# def edit(request, contest_id=None):
# def fetch_task(request, contest_id):
# def copy_task(form):
# def add_task_to_groups(contest, task):
# def submit(request, contest_id):
# def save_submit(request, contest_id):
# def _generate_webhook_secret(size=settings.WEBHOOK_SECRET_LENGTH,
#                              chars=string.ascii_letters + string.digits):
# 
# Path: harnas/contest/views/groups.py
# def new(request, contest_id):
# def view(request, contest_id, group_id):
# def edit_task_details(request, contest_id, group_id, task_id):
# def delete(request, contest_id, group_id):
# 
# Path: harnas/contest/views/news.py
# def new(request, contest_id):
# def delete(request, contest_id, news_id):
# def edit(request, contest_id, news_id):
# 
# Path: harnas/contest/views/submit.py
# def details(request, id):
# 
# Path: harnas/contest/views/task.py
# def index(request):
# def details(request, task_id):
# def new(request):
#     def new_task_assign_perm(task):
# def edit(request, task_id):
#     def invalidate_task_cache(task):
# def handle_task_form(request, form_post, task, success_action):
# def upload_file(request, task_id):
# def download_file(request, task_id):
# def delete_file(request, task_id):
# def get_existing_file(request, task_id):
# 
# Path: harnas/contest/views/testcase.py
# def new(request, task_id):
# def edit(request, task_id, testcase_id):
# def handle_testcase_form(request, task, testcase):
# def handle_testcase_files(testcase, in_file, out_file):


from django.conf.urls import include, url
from harnas.contest.views import contest, groups, news, submit, task, testcase

task_urlpatterns = [
    url(r'^$',
        task.index,
        name='task_index'),
    url(r'^new$',
        task.new,
        name='task_new'),
    url(r'^(?P<task_id>\d+)/', include([
        url(r'^$',
            task.details,
            name='task_details'),
        url(r'^edit/$',
            task.edit,
            name='task_edit'),
        url(r'^upload_file/$',
            task.upload_file,
            name='task_upload_file'),
        url(r'^download_file/$',
            task.download_file,
            name='task_download_file'),
        url(r'^delete_file/$',
            task.delete_file,
            name='task_delete_file'),
        url(r'^testcase/', include([
            url(r'^new/$',
                testcase.new,
                name='testcase_new'),
            url(r'^edit/(?P<testcase_id>\d+)/',

# Path: harnas/contest/views/contest.py
# def index(request):
# def details(request, contest_id):
# def edit(request, contest_id=None):
# def fetch_task(request, contest_id):
# def copy_task(form):
# def add_task_to_groups(contest, task):
# def submit(request, contest_id):
# def save_submit(request, contest_id):
# def _generate_webhook_secret(size=settings.WEBHOOK_SECRET_LENGTH,
#                              chars=string.ascii_letters + string.digits):
# 
# Path: harnas/contest/views/groups.py
# def new(request, contest_id):
# def view(request, contest_id, group_id):
# def edit_task_details(request, contest_id, group_id, task_id):
# def delete(request, contest_id, group_id):
# 
# Path: harnas/contest/views/news.py
# def new(request, contest_id):
# def delete(request, contest_id, news_id):
# def edit(request, contest_id, news_id):
# 
# Path: harnas/contest/views/submit.py
# def details(request, id):
# 
# Path: harnas/contest/views/task.py
# def index(request):
# def details(request, task_id):
# def new(request):
#     def new_task_assign_perm(task):
# def edit(request, task_id):
#     def invalidate_task_cache(task):
# def handle_task_form(request, form_post, task, success_action):
# def upload_file(request, task_id):
# def download_file(request, task_id):
# def delete_file(request, task_id):
# def get_existing_file(request, task_id):
# 
# Path: harnas/contest/views/testcase.py
# def new(request, task_id):
# def edit(request, task_id, testcase_id):
# def handle_testcase_form(request, task, testcase):
# def handle_testcase_files(testcase, in_file, out_file):


# Path: harnas/contest/urls.py
from django.conf.urls import include, url
from harnas.contest.views import contest, groups, news, submit, task, testcase


task_urlpatterns = [
    url(r'^$',
        task.index,
        name='task_index'),
    url(r'^new$',
        task.new,
        name='task_new'),
    url(r'^(?P<task_id>\d+)/', include([
        url(r'^$',
            task.details,
            name='task_details'),
        url(r'^edit/$',
            task.edit,
            name='task_edit'),
        url(r'^upload_file/$',
            task.upload_file,
            name='task_upload_file'),
        url(r'^download_file/$',
            task.download_file,
            name='task_download_file'),
        url(r'^delete_file/$',
            task.delete_file,
            name='task_delete_file'),
        url(r'^testcase/', include([
            url(r'^new/$',
                testcase.new,
                name='testcase_new'),
            url(r'^edit/(?P<testcase_id>\d+)/',

                testcase.edit,