Пример #1
0
from django.conf.urls.defaults import *

from canvas.url_util import re_slug, re_int, re_group_slug, re_year, re_month, re_day, maybe

urlpatterns = patterns(
    'apps.public_api.views',
    url('^$', 'root'),
    url('^posts/' + maybe(re_slug('short_id')) + '$', 'posts'),
    url('^users/' + maybe(re_slug('username')) + '$', 'users'),
    url('^groups/' + maybe(re_group_slug('group_name')) + '$', 'groups'),
)
Пример #2
0
    url(r'^user/' + re_slug('username') + '/?$', 'user_view', kwargs={'userpage_type':'top'}, name="user_link"),
    url(r'^user/' + re_slug('username') + '/edit/?$', 'user_edit'),
    url(r'^user/' + re_slug('username') + '/new/?$', 'user_view', kwargs={'userpage_type':'new'}),
    url(r'^user/' + re_slug('username') + '/anonymous/?$', 'user_view', kwargs={'userpage_type':'top_anonymous'}),
    url(r'^user/' + re_slug('username') + '/anonymous/new/?$', 'user_view', kwargs={'userpage_type':'new_anonymous'}),
    url(r'^user/' + re_slug('username') + '/stickered/?$', 'user_view', kwargs={'userpage_type':'stickered'}),
    url(r'^warning$', 'warning'),
    url(r'^warning/code_of_conduct$', 'blocking_coc'),
    url(r'^js_testing$', 'direct_to_django_template', kwargs={'template': 'js_testing.django.html'}),
    url(r'^landing/wall1$', 'remix_share_page'),
    url(r'^debug_fact_stream$', 'debug_fact_stream'),
    url(r'^public_api/', include('apps.public_api.urls')),
)

group_browse_urls = patterns('canvas.views',
    url(r'^' + re_group_slug('name') + '/?$', 'category', kwargs={'sort': 'hot'}),
    url(r'^' + re_group_slug('name') + '/about$', 'group_about'),
    url(r'^' + re_group_slug('name') + '/active$', 'category', kwargs={'sort': 'active'}),
    url(r'^' + re_group_slug('name') + '/best$', 'category', kwargs={'sort': 'best'}),
    url(r'^' + re_group_slug('name') + '/new$', 'category', kwargs={'sort': 'new'}),
    url(r'^' + re_group_slug('name') + '/top$', 'category', kwargs={'sort': 'top'}),
    url(r'^' + re_group_slug('name') + '/top/' + re_day + '$', 'category', kwargs={'sort': 'top'}),
    url(r'^' + re_group_slug('name') + '/top/' + re_month + '$', 'category', kwargs={'sort': 'top'}),
    url(r'^' + re_group_slug('name') + '/top/' + re_year + '$', 'category', kwargs={'sort': 'top'}),
)

tag_browse_urls = patterns('canvas.views',
    url(r'^' + re_group_slug('tag') + '/?$', 'tag', kwargs={'sort': 'hot'}),
    url(r'^' + re_group_slug('tag') + '/best$', 'tag', kwargs={'sort': 'top'}),
    url(r'^' + re_group_slug('tag') + '/new$', 'tag', kwargs={'sort': 'new'}),
)
Пример #3
0
        kwargs={'userpage_type': 'new_anonymous'}),
    url(r'^user/' + re_slug('username') + '/stickered/?$',
        'user_view',
        kwargs={'userpage_type': 'stickered'}),
    url(r'^warning$', 'warning'),
    url(r'^warning/code_of_conduct$', 'blocking_coc'),
    url(r'^js_testing$',
        'direct_to_django_template',
        kwargs={'template': 'js_testing.django.html'}),
    url(r'^landing/wall1$', 'remix_share_page'),
    url(r'^debug_fact_stream$', 'debug_fact_stream'),
)

group_browse_urls = patterns(
    'canvas.views',
    url(r'^' + re_group_slug('name') + '/?$',
        'category',
        kwargs={'sort': 'hot'}),
    url(r'^' + re_group_slug('name') + '/about$', 'group_about'),
    url(r'^' + re_group_slug('name') + '/active$',
        'category',
        kwargs={'sort': 'active'}),
    url(r'^' + re_group_slug('name') + '/best$',
        'category',
        kwargs={'sort': 'best'}),
    url(r'^' + re_group_slug('name') + '/new$',
        'category',
        kwargs={'sort': 'new'}),
    url(r'^' + re_group_slug('name') + '/top$',
        'category',
        kwargs={'sort': 'top'}),
Пример #4
0
from django.conf.urls.defaults import *

from canvas.url_util import re_slug, re_int, re_group_slug, re_year, re_month, re_day, maybe

urlpatterns = patterns('apps.public_api.views',
    url('^$', 'root'),
    url('^posts/' + maybe(re_slug('short_id')) + '$', 'posts'),
    url('^users/' + maybe(re_slug('username')) + '$', 'users'),
    url('^groups/' + maybe(re_group_slug('group_name')) + '$', 'groups'),
)