# under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from categories.views import sub_categories, attach_category, detach_category from categories.views import del_category, new_category, attach_course from categories.views import detach_course, sub_courses from categories.models import Category from utils.decorators import enforce_post, moderate from utils.json import json_sublist urlpatterns = patterns( "categories.views", url(r"^new", moderate(enforce_post(login_required(new_category))), name="category_new"), url( r"^attach/(?P<category>[^/]+)/(?P<subcategory>[^/]+)$", moderate(login_required(attach_category)), name="category_attach", ), url( r"^detach/(?P<category>[^/]+)/(?P<parent>[^/]+)$", moderate(login_required(detach_category)), name="category_detach", ), url( r"^add_course/(?P<category>[^/]+)/(?P<slug>[^/]+)$", moderate(login_required(attach_course)), name="cat_course_add", ),
from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.list_detail import object_detail from documents.models import UploadFileForm, UploadHttpForm from courses.models import Course from utils.json import json_sublist from courses.views import new_course from utils.decorators import AR, enforce_post, moderate urlpatterns = patterns( "courses.views", url(r"^new", moderate(enforce_post(login_required(new_course))), name="course_new"), url( r"^all$", login_required(json_sublist), {"queryset": Course.objects.all, "fields": ["id", "slug", "name", "description"]}, name="courses_all", ), url( r"^get/(?P<slug>[^/]+)", login_required(object_detail), {"queryset": Course.objects.all(), "template_name": "course_get.tpl"}, name="course_get", ), url( r"^s/(?P<slug>[^/]+)", AR(login_required(object_detail)), { "queryset": Course.objects.all(), "template_name": "course_show.tpl", "extra_context": {"uform": UploadFileForm(), "hform": UploadHttpForm()},
from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.list_detail import object_detail, object_list from documents.models import UploadFileForm, UploadHttpForm from courses.models import Course from messages.models import NewThreadForm from upvotes.models import CAT_DOCUMENTS from utils.json import json_sublist_send, json_select_send from courses.views import new_course from utils.decorators import AR, enforce_post, chk_perm urlpatterns = patterns( 'courses.views', url(r'^new', enforce_post(chk_perm(login_required(new_course), 'structure_manage')), name="course_new"), url(r'^all$', login_required(json_sublist_send), { 'queryset': Course.objects.all, 'fields': ['id', 'slug', 'name', 'description'] }, name='courses_all'), url(r'get/(?P<slug>[^/]+)', login_required(json_select_send), { 'queryset': Course.objects.all, 'fields': ['id', 'slug', 'name', 'description'] }, name='course_get'), url(r'^s/(?P<slug>[^/]+)', AR(login_required(object_detail)), {
# under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from categories.views import sub_categories, attach_category, detach_category from categories.views import del_category, new_category, attach_course from categories.views import detach_course, sub_courses, edit_category from categories.models import Category from utils.decorators import enforce_post, chk_perm from utils.json import json_sublist_send urlpatterns = patterns('categories.views', url(r'^new', enforce_post(chk_perm(login_required(new_category), 'structure_manage')), name="category_new"), url(r'^edit$', enforce_post(chk_perm(login_required(edit_category), 'structure_manage')), name="category_edit"), url(r'^attach/(?P<category>[^/]+)/(?P<subcategory>[^/]+)$', chk_perm(login_required(attach_category), 'structure_manage'), name="category_attach"), url(r'^detach/(?P<category>[^/]+)/(?P<parent>[^/]+)$', chk_perm(login_required(detach_category), 'structure_manage'), name="category_detach"), url(r'^add_course/(?P<category>[^/]+)/(?P<slug>[^/]+)$',
name="document_all"), url(r'^all/(?P<slug>[^/]+)$', login_required(doc_by_course), name="document_by_course"), url(r'^pending/(?P<slug>[^/]+)$', login_required(doc_pending), name="document_pending"), url(r'^description/(?P<id>[^/]+)$', login_required(description), name="document_desc"), url(r'^edit/(?P<object_id>[^/]+)$', chk_perm(enforce_post(login_required(edit_post)), 'document_edit'), name="document_edit"), url(r'^put/(?P<slug>[^/]+)$', enforce_post(login_required(upload_file)), name="upload_file"), url(r'^put_http/(?P<slug>[^/]+)$', enforce_post(login_required(upload_http)), name="upload_http_file"), url(r'^r/(?P<id>\d+)/.*', login_required(download_file), name="download_file"), url(r'^i/(?P<pid>[^/]+)$',
# the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.list_detail import object_detail, object_list from documents.models import UploadFileForm, UploadHttpForm from courses.models import Course from messages.models import NewThreadForm from utils.json import json_sublist from courses.views import new_course from utils.decorators import AR, enforce_post, moderate urlpatterns = patterns('courses.views', url(r'^new', moderate(enforce_post(login_required(new_course))), name="course_new"), url(r'^all$', login_required(json_sublist), {'queryset': Course.objects.all, 'fields': ['id', 'slug', 'name', 'description']}, name='courses_all'), url(r'^get/(?P<slug>[^/]+)', login_required(object_detail), {'queryset': Course.objects.all(), 'template_name': 'course_get.tpl'}, name="course_get"), url(r'^s/(?P<slug>[^/]+)', AR(login_required(object_detail)), {'queryset': Course.objects.all(),
from messages.views import post_thread, list_thread, post_msg from categories.models import Category urlpatterns = patterns('notes.views', url(r'^boards', AR(login_required(direct_to_template)), {'set': Category.objects.filter(name='Project 402')[0], 'template': 'boards.tpl', 'extra_context': {'tform': NewThreadForm()}}, name="general_boards"), url(r'^list/(?P<courseid>[^/]+)/(?P<docid>[^/]+)/(?P<pageid>[^/]+)$', login_required(list_thread), name="thread_list"), url(r'^view_thread/(?P<object_id>[^/]+)$', AR(login_required(object_detail)), {'queryset': Thread.objects.all(), 'template_name': 'thread_view.tpl', 'extra_context': {'mform': NewPostForm()}}, name="thread_view"), url(r'^post_thread$', enforce_post(login_required(post_thread)), name="thread_post"), url(r'^post_msg$', enforce_post(login_required(post_msg)), name="message_post"), )
# Copyright 2011, hast. All rights reserved. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. from django.conf.urls.defaults import patterns, url from django.views.generic.simple import direct_to_template from django.contrib.auth.views import login, logout from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from utils.decorators import AR, moderate, enforce_post from users.views import mask_welcome, get_courses, follow, unset_modo, set_modo from users.views import new_user urlpatterns = patterns( "users.views", url(r"^$", AR(login_required(direct_to_template)), {"template": "user_show.tpl"}, name="profile"), url(r"^mask_welcome$", AR(login_required(mask_welcome)), name="mask_welcome"), url(r"^courses$", login_required(get_courses), name="user_courses"), url(r"^follow$", require_POST(login_required(follow)), name="user_follow"), url(r"^login/$", login, {"template_name": "user_login.tpl"}, name="user_login"), url(r"^logout/$", logout, {"next_page": "/"}, name="user_logout"), url(r"^set_modo/(?P<uid>[^/]+)$", moderate(login_required(set_modo)), name="user_set_modo"), url(r"^unset_modo/(?P<uid>[^/]+)$", moderate(login_required(unset_modo)), name="user_unset_modo"), url(r"^new$", enforce_post(moderate(login_required(new_user))), name="user_new"), )
from users.views import mask_welcome, get_courses, follow, add_perm, rm_perm from users.views import new_user, unfollow urlpatterns = patterns( 'users.views', url(r'^$', AR(login_required(direct_to_template)), {'template': 'user_show.tpl'}, name='profile'), url(r'^mask_welcome$', AR(login_required(mask_welcome)), name='mask_welcome'), url(r'^courses$', login_required(get_courses), name="user_courses"), url(r'^follow$', require_POST(login_required(follow)), name="user_follow"), url(r'^unfollow$', require_POST(login_required(unfollow)), name="user_unfollow"), url(r'^login/$', login, {'template_name': 'user_login.tpl'}, name="user_login"), url(r'^logout/$', logout, {'next_page': '/'}, name="user_logout"), url(r'^new$', enforce_post(chk_perm(login_required(new_user), 'user_manage')), name='user_new'), url(r'^add_perm$', enforce_post(chk_perm(login_required(add_perm), 'user_manage')), name='user_add_perm'), url(r'^remove_perm$', enforce_post(chk_perm(login_required(rm_perm), 'user_manage')), name='user_remove_perm'), )
name="general_boards"), url(r'^list/(?P<courseid>[^/]+)/(?P<docid>[^/]+)/(?P<pageid>[^/]+)$', login_required(list_thread), name="thread_list"), url(r'^view_thread/(?P<object_id>[^/]+)$', AR(login_required(object_detail)), {'queryset': Thread.objects.all(), 'template_name': 'thread_view.tpl', 'extra_context': {'mform': NewPostForm(), 'eform': EditPostForm()}}, name="thread_view"), url(r'^post_thread$', enforce_post(login_required(post_thread)), name="thread_post"), url(r'^post_msg$', enforce_post(login_required(post_msg)), name="message_post"), url(r'^edit$', enforce_post(chk_perm(login_required(edit_msg), 'message_edit')), name="message_edit"), url(r'^remove$', enforce_post(chk_perm(login_required(remove_msg), 'message_remove')), name="message_remove"), url(r'^markdown$',
'owner.get_profile.real_name', 'points.full_category', 'points.category' ] }, name="document_all"), url(r'^all/(?P<slug>[^/]+)$', login_required(doc_by_course), name="document_by_course"), url(r'^pending/(?P<slug>[^/]+)$', login_required(doc_pending), name="document_pending"), url(r'^description/(?P<id>[^/]+)$', login_required(description), name="document_desc"), url(r'^edit/(?P<object_id>[^/]+)$', chk_perm(enforce_post(login_required(edit_post)), 'document_edit'), name="document_edit"), url(r'^put/(?P<slug>[^/]+)$', enforce_post(login_required(upload_file)), name="upload_file"), url(r'^put_http/(?P<slug>[^/]+)$', enforce_post(login_required(upload_http)), name="upload_http_file"), url(r'^r/(?P<id>\d+)/.*', login_required(download_file), name="download_file"), url(r'^i/(?P<pid>[^/]+)$', login_required(download_page), name="download_page"), url(r'^m/(?P<pid>\d+)$', login_required(download_mpage),
# your option) any later version. from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.list_detail import object_detail, object_list from documents.models import UploadFileForm, UploadHttpForm from courses.models import Course from messages.models import NewThreadForm from upvotes.models import CAT_DOCUMENTS from utils.json import json_sublist_send, json_select_send from courses.views import new_course from utils.decorators import AR, enforce_post, chk_perm urlpatterns = patterns('courses.views', url(r'^new', enforce_post(chk_perm(login_required(new_course), 'structure_manage')), name="course_new"), url(r'^all$', login_required(json_sublist_send), {'queryset': Course.objects.all, 'fields': ['id', 'slug', 'name', 'description']}, name='courses_all'), url(r'get/(?P<slug>[^/]+)', login_required(json_select_send), {'queryset': Course.objects.all, 'fields': ['id', 'slug', 'name', 'description']}, name='course_get'), url(r'^s/(?P<slug>[^/]+)', AR(login_required(object_detail)), {'queryset': Course.objects.all(),
}, name="general_boards"), url(r'^list/(?P<courseid>[^/]+)/(?P<docid>[^/]+)/(?P<pageid>[^/]+)$', login_required(list_thread), name="thread_list"), url(r'^view_thread/(?P<object_id>[^/]+)$', AR(login_required(object_detail)), { 'queryset': Thread.objects.all(), 'template_name': 'thread_view.tpl', 'extra_context': { 'mform': NewPostForm(), 'eform': EditPostForm() } }, name="thread_view"), url(r'^post_thread$', enforce_post(login_required(post_thread)), name="thread_post"), url(r'^post_msg$', enforce_post(login_required(post_msg)), name="message_post"), url(r'^edit$', enforce_post(chk_perm(login_required(edit_msg), 'message_edit')), name="message_edit"), url(r'^remove$', enforce_post(chk_perm(login_required(remove_msg), 'message_remove')), name="message_remove"), url(r'^markdown$', enforce_post(login_required(markdown)), name="markdown"), )
AR(login_required(mask_welcome)), name='mask_welcome'), url(r'^courses$', login_required(get_courses), name="user_courses"), url(r'^follow$', require_POST(login_required(follow)), name="user_follow"), url(r'^unfollow$', require_POST(login_required(unfollow)), name="user_unfollow"), url(r'^login/$', login, {'template_name': 'user_login.tpl'}, name="user_login"), url(r'^logout/$', logout, {'next_page': '/'}, name="user_logout"), url(r'^set_modo/(?P<uid>[^/]+)$', moderate(login_required(set_modo)), name="user_set_modo"), url(r'^unset_modo/(?P<uid>[^/]+)$', moderate(login_required(unset_modo)), name="user_unset_modo"), url(r'^new$', enforce_post(moderate(login_required(new_user))), name='user_new'), )
# Copyright 2011, hast. All rights reserved. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. from django.conf.urls.defaults import patterns, url from django.views.generic.simple import direct_to_template from django.contrib.auth.views import login, logout from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from utils.decorators import AR, chk_perm, enforce_post from users.views import mask_welcome, get_courses, follow, add_perm, rm_perm from users.views import new_user, unfollow urlpatterns = patterns( "users.views", url(r"^$", AR(login_required(direct_to_template)), {"template": "user_show.tpl"}, name="profile"), url(r"^mask_welcome$", AR(login_required(mask_welcome)), name="mask_welcome"), url(r"^courses$", login_required(get_courses), name="user_courses"), url(r"^follow$", require_POST(login_required(follow)), name="user_follow"), url(r"^unfollow$", require_POST(login_required(unfollow)), name="user_unfollow"), url(r"^login/$", login, {"template_name": "user_login.tpl"}, name="user_login"), url(r"^logout/$", logout, {"next_page": "/"}, name="user_logout"), url(r"^new$", enforce_post(chk_perm(login_required(new_user), "user_manage")), name="user_new"), url(r"^add_perm$", enforce_post(chk_perm(login_required(add_perm), "user_manage")), name="user_add_perm"), url(r"^remove_perm$", enforce_post(chk_perm(login_required(rm_perm), "user_manage")), name="user_remove_perm"), )
# under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from categories.views import sub_categories, attach_category, detach_category from categories.views import del_category, new_category, attach_course from categories.views import detach_course, sub_courses, edit_category from categories.models import Category from utils.decorators import enforce_post, moderate from utils.json import json_sublist_send urlpatterns = patterns('categories.views', url(r'^new', moderate(enforce_post(login_required(new_category))), name="category_new"), url(r'^edit$', enforce_post(moderate(login_required(edit_category))), name="category_edit"), url(r'^attach/(?P<category>[^/]+)/(?P<subcategory>[^/]+)$', moderate(login_required(attach_category)), name="category_attach"), url(r'^detach/(?P<category>[^/]+)/(?P<parent>[^/]+)$', moderate(login_required(detach_category)), name="category_detach"), url(r'^add_course/(?P<category>[^/]+)/(?P<slug>[^/]+)$',
name="document_all"), url(r'^all/(?P<slug>[^/]+)$', login_required(doc_by_course), name="document_by_course"), url(r'^pending/(?P<slug>[^/]+)$', login_required(doc_pending), name="document_pending"), url(r'^description/(?P<id>[^/]+)$', login_required(description), name="document_desc"), url(r'^edit/(?P<id>[^/]+)$', moderate(enforce_post(login_required(edit_post))), name="document_edit"), url(r'^put/(?P<slug>[^/]+)$', enforce_post(login_required(upload_file)), name="upload_file"), url(r'^put_http/(?P<slug>[^/]+)$', enforce_post(login_required(upload_http)), name="upload_http_file"), url(r'^r/(?P<id>\d+)/.*', login_required(download_file), name="download_file"), url(r'^i/(?P<pid>[^/]+)$',
name="general_boards"), url(r'^list/(?P<courseid>[^/]+)/(?P<docid>[^/]+)/(?P<pageid>[^/]+)$', login_required(list_thread), name="thread_list"), url(r'^view_thread/(?P<object_id>[^/]+)$', AR(login_required(object_detail)), {'queryset': Thread.objects.all(), 'template_name': 'thread_view.tpl', 'extra_context': {'mform': NewPostForm(), 'eform': EditPostForm()}}, name="thread_view"), url(r'^post_thread$', enforce_post(login_required(post_thread)), name="thread_post"), url(r'^post_msg$', enforce_post(login_required(post_msg)), name="message_post"), url(r'^edit$', moderate(enforce_post(login_required(edit_msg))), name="message_edit"), url(r'^remove$', moderate(enforce_post(login_required(remove_msg))), name="message_remove"), url(r'^markdown$',