from django.conf.urls.defaults import * from django.views.generic.list import ListView # from django.contrib.auth.models import User # from django.contrib.comments.models import Comment from ct_blog.views import blog_new_post, blog_edit_post, blog_delete_post from ct_groups.models import CTGroup #, email_comment, fix_open_id, email_unique from ct_groups.forms import CTPageForm from ct_groups.views import group_detail, group_edit, group_settings, \ remove_editor, make_editor, remove_manager, make_manager, \ moderate_accept, moderate_refuse, moderate_refuse_confirm, moderate_remove, \ invite_member, accept_invitation, complete_invitation, register_invitee, invitation_remove, \ remove_member, contact_managers, contact_managers_sent from ct_groups.decorators import group_perm blog_view = group_perm('blog', 'r') blog_edit = group_perm('blog', 'w') blog_delete = group_perm('blog', 'd') group_access = group_perm('group', 'r') group_write = group_perm('group', 'w') contact_managers_perm = group_perm('contact_managers', 'w') wiki_args = {'group_slug_field': 'slug', 'group_qs': CTGroup.objects.all(), 'ArticleFormClass': CTPageForm } urlpatterns = patterns('', url(r'^$', ListView.as_view(queryset=CTGroup.objects.all(), paginate_by=400, template_name='ct_groups/ct_groups_index.html' ), name="groups"),
# -*- coding: utf-8 -*- from django.conf.urls.defaults import * from wiki import views, models from wiki.urls import WIKI_URL_RE from ct_groups.decorators import group_perm from ct_groups.views import delete_page wiki_view = group_perm('wiki', 'r') wiki_edit = group_perm('wiki', 'w') wiki_delete = group_perm('wiki', 'd') urlpatterns = patterns('', url(r'^$', views.article_list, name='wiki_index'), # url(r'^list/$', views.article_list, name='wiki_list'), # # url(r'^search/$', views.search_article, name="wiki_search"), # # url(r'^history/$', views.history, name='wiki_history'), # # url(r'^feeds/(?P<feedtype>\w+)/$', views.history_feed, name='wiki_history_feed'), # # url(r'^(?P<title>'+ WIKI_URL_RE +r')/feeds/(?P<feedtype>\w+)/$', views.article_history_feed, # name='wiki_article_history_feed'), # url(r'^(?P<title>'+ WIKI_URL_RE +r')/$', wiki_view(views.view_article), name='wiki_article'), # url(r'^edit/(?P<title>'+ WIKI_URL_RE +r')/$', wiki_edit(views.edit_article), name='wiki_edit'),
""" urls.py for clintemplates app """ from django.conf.urls.defaults import * from ct_groups.decorators import group_perm from ct_template.views import new_template resource_write = group_perm('resource', 'w') urlpatterns = patterns('ct_template.views', url(r'^$', 'index'), url(r'^(?P<object_id>\d+)/$', 'detail', name="template-detail"), url(r'^(?P<object_id>\d+)/addreview/$', 'addreview'), url(r'^(?P<object_id>\d+)/delete/$', 'delete', name="template-delete"), url(r'^(?P<object_id>\d+)/print/$', 'detail_for_print', name="template-detail-for-print"), url(r'^(?P<object_id>\d+)/settings/$', 'settings_edit', name="template-settings"), url(r'^(?P<object_id>\d+)/node-metadata/(?P<node_id>\w+)/edit/$', 'edit_node_metadata', name="edit-node-metadata"), url(r'^(?P<object_id>\d+)/node-metadata/(?P<node_id>\w+)/$', 'get_node_metadata', name="node-metadata"), url(r'^(?P<object_id>\d+)/(?P<comment_id>\w+)/$', 'showcomment'), url(r'^(?P<object_id>\d+)/(?P<comment_id>\w+)/comment/$', 'addcomment'), url(r'^(?P<object_id>\d+)/(?P<view_id>\w+)/(?P<item_id>\w+)/edit/$', 'edititem', name="template-item-edit"), url(r'^(?P<group_slug>[^/]+)/new-ct/', resource_write(new_template), name='new-ct'), )