Source

django-swingcms / swingcms / custodian / _urls.py

Full commit
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from django.conf.urls.defaults import *


urlpatterns = patterns("custodian.views",

    # authorization
    (r"^login/$", 'login'),
    (r"^logout/$", 'logout'),

    # groups
    (r"^edit_groups$", 'edit_groups'),
    (r"^edit_groups/(?P<order>[a-z_]+)$", 'edit_groups'),
    (r"^add_group$", "add_group"),
    (r"^change_group/(?P<group_id>\d+)$", 'change_group'),
    (r"^delete_group/(?P<group_id>\d+)$", 'delete_group'),

    # edit group
    (r"^edit_group/(?P<group_id>\d+)$", 'edit_group'),
    (r"^edit_group/(?P<group_id>\d+)/(?P<order>[a-z_]+)$", 'edit_group'),
    (r"^include_group/(?P<group_id>\d+)$", 'include_user'),
    (r"^exclude_group/(?P<group_id>\d+)/user/(?P<user_id>\d+)$", 'exclude_user'),

    # users
    (r"^edit_users$", 'edit_users'),
    (r"^edit_users/(?P<order>[a-z_]+)$", 'edit_users'),
    (r"^add_user$", "add_user"),
    (r"^change_user/(?P<user_id>\d+)$", 'change_user'),
    (r"^delete_user/(?P<user_id>\d+)$", 'delete_user'),

    # global and model permissions
    (r"^edit_global_and_model_perms/group/(?P<group_id>\d+)$", 'edit_group_global_and_model_perms'),
    (r"^edit_global_and_model_perms/user/(?P<user_id>\d+)$", 'edit_user_global_and_model_perms'),

    # specific permissions
    (r"^edit_specific_perms/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'edit_specific_perms'),
    (r"^edit_specific_perms/user/(?P<user_id>\d+)/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'edit_user_specific_perms'),
    (r"^edit_specific_perms/group/(?P<group_id>\d+)/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'edit_group_specific_perms'),
)