Source

django-swingcms / swingcms / cms / _urls.py

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

from django.conf.urls.defaults import *

import settings



urlpatterns = patterns('cms.views',

    (r"^message/(?P<msg>[^/]+)/(?P<level>[a-zA-Z]+)$", 'message'),

    # generic hierarchic obj
    (r"^add/(?P<parent_model_name>[a-z]+)/(?P<parent_id>\d+)/(?P<obj_model_name>[a-z]+)$", 'add_content'),
    (r"^view/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'view_content'),
    (r"^change/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'change_content'),
    (r"^delete/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'delete_content'),
    (r"^copy/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'copy_content'),
    (r"^cut/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'cut_content'),
    (r"^paste/(?P<parent_model_name>folder)/(?P<parent_id>\d+)$", 'paste_clipboard'),
    (r"^paste/(?P<parent_model_name>folder)/(?P<parent_id>\d+)/(?P<order_by>.+)$", 'paste_clipboard'),
    # folder
    (r"^view/(?P<obj_model_name>folder)/(?P<obj_id>\d+)$", 'view_folder'),
    (r"^edit/(?P<obj_model_name>folder)/(?P<obj_id>\d+)$", 'edit_folder'),
    (r"^view/(?P<obj_model_name>folder)/(?P<obj_id>\d+)/(?P<order_by>.+)$", 'view_folder'),
    (r"^edit/(?P<obj_model_name>folder)/(?P<obj_id>\d+)/(?P<order_by>.+)$", 'edit_folder'),
    # collector
    (r"^view/(?P<obj_model_name>collector)/(?P<obj_id>\d+)$", 'view_collector'),
    # collage
    (r"^add/row/(?P<obj_model_name>collage)/(?P<obj_id>\d+)/(?P<y>\d+)$", 'add_row'),
    (r"^add/slot/(?P<obj_model_name>collage)/(?P<obj_id>\d+)/(?P<y>\d+)/(?P<x>\d+)$", 'add_slot'),
    (r"^delete/row/(?P<obj_model_name>collage)/(?P<obj_id>\d+)/(?P<y>\d+)$", 'delete_row'),
    (r"^delete/slot/(?P<obj_model_name>collage)/(?P<obj_id>\d+)/(?P<y>\d+)/(?P<x>\d+)$", 'delete_slot'),
    (r"^view/(?P<obj_model_name>collage)/(?P<obj_id>\d+)$", 'view_collage'),
    (r"^edit/(?P<obj_model_name>collage)/(?P<obj_id>\d+)$", 'edit_collage'),
    # change status
    (r"^change_status/(?P<status>[a-z]+)/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'change_status'),
    # change status recursive
    (r"^change_status/(?P<mode>recursive)/(?P<status>[a-z]+)/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)$", 'change_status'),
    # search content
    (r"^search/(?P<obj_model_name>[a-z]+)/(?P<obj_name>\W+)$", 'search_content_proxy'),

    # search content
    (r"^sitemap$", 'sitemap'),
    # mass operation
    (r"^mass_insert$", 'mass_insert'),
    # search plugin
    (r"^search$", 'search'),
    # set language
    (r"^language/(?P<language>[A-Za-z_\-]+)$", 'set_language'),
    # serve
    (r"^serve/(?P<download_mode>attachment)/(?P<source_mode>obj)/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)/(?P<file_field_name>[\w\-@.]+)$", 'serve'),
    (r"^serve/(?P<download_mode>inline)/(?P<source_mode>obj)/(?P<obj_model_name>[a-z]+)/(?P<obj_id>\d+)/(?P<file_field_name>[\w\-@.]+)$", 'serve'),
    (r"^serve/(?P<download_mode>attachment)/(?P<source_mode>url)$", 'serve'),
    (r"^serve/(?P<download_mode>inline)/(?P<source_mode>url)$", 'serve'),
    # ajax
    (r"^ajax$", 'ajax'),
    # browser for CKEditor
    (r"^CKEditor_browser$", 'CKEditor_browser'),
    # uploader for CKEditor
    (r"^CKEditor_uploader$", 'CKEditor_uploader'),
    # test
    (r"^test$", 'test'),

    # panel
    (r"^panel$", 'panel'),
    # switch
    (r"^switch_site_status$", 'switch_site_status'),
    # edit text
    (r"^edit/text$", 'edit_text_file'),
    # clean
    (r"^clean/(?P<task>[a-z_]+)$", 'clean'),
    # backup
    (r"^backup$", 'backup'),
    (r"^backup/(?P<mode>[a-z_]+)$", 'backup'),
    (r"^download_backup$", 'download_backup'),
    # edit categories
    (r"^edit_categories/(?P<scopes>[A-Za-z_-]+)$", 'edit_categories'),
    # delete categories
    (r"^delete_category/(?P<id_>\d+)$", 'delete_category'),
)