Пример #1
0
    url(r'^/(?P<pk>\d+)/update/?$', ThreadUpdate.as_view(), name='update'),
    url(r'^/(?P<pk>\d+)/delete/?$', ThreadDelete.as_view(), name='delete'),
    url(r'^/create/?$', ThreadCreate.as_view(), name='create'),
    url(r'^/(?P<thread_pk>\d+)/challenge/?$',
        thread_challenge_view,
        name='attach_challenge'),
    url(r'^/search/?$', ThreadList.as_view(), {'search': True}, name='search'),
)

forumpatterns = patterns(
    '',
    url(r'^s?/?$', CategoryList.as_view(), name='list'),
    url(r'^/(?P<pk>\d+)/?$', CategoryDetail.as_view(), name='view'),
    url(r'^/(?P<pk>\d+)/?$', CategoryUpdate.as_view(), name='update'),
    url(r'^/(?P<pk>\d+)/?$', CategoryDelete.as_view(), name='delete'),
    url(r'^/create/?$', CategoryCreate.as_view(), name='create'),
    url(r'^/search/?$', ThreadList.as_view(), {'search': True}, name='search'),
)

challengepatterns = patterns(
    '',
    url(r'^s?/?$', ChallengeList.as_view(), name='list'),
    url(r'^/(?P<pk>\d+)/?$', ChallengeDetail.as_view(), name='view'),
    url(r'^/(?P<pk>\d+)/update/?$', ChallengeUpdate.as_view(), name='update'),
    url(r'^/(?P<pk>\d+)/delete/?$', ChallengeDelete.as_view(), name='delete'),
)

tagpatterns = patterns(
    '',
    url(r'^s?/?$', TagList.as_view(), name='list'),
    url(r'^/(?P<pk>\d+)/?$', TagDetail.as_view(), name='view'),
Пример #2
0
    url(r'^relation/(?P<slug>.+)', 'relation', name='relation'),
    url(r'^relation/add/$', 'add_relation', name='add_relation'),
    url(r'^relation/edit', 'edit_relation', name='edit_relation'),
    url(r'^relation/remove', 'remove_relation', name='remove_relation'),

    # Alterations:
    ## Class-Views
    url(r'^alterations/list/$', ListView.as_view(queryset=Alteration.objects.all().order_by('-at')), name='list-alterations'),
    url(r'^alteration/(?P<pk>\d+)', DetailView.as_view(model=Alteration), name='detail-alteration'),
    ## Function-Views
    url(r'^alterations/$', 'alterations', name='alterations'),
    url(r'^alteration/(?P<slug>d+)', 'alteration', name='alteration'),

    # Tags:
    ## Class-Views
    url(r'^tags/list/$', ListView.as_view(queryset=Tag.objects.all(),
        template_name='data/tag_list.html'), name='list-entry-tags'), # Shows number of tagged entries.
    url(r'^tag/(?P<pk>\d+)', TagDetail.as_view(), name='entry-tag-detail'), # Shows list of tagged entries.
    url(r'^tag/(?P<slug>.+)', TagDetail.as_view(), name='entry-tag'),
    ## Function-Views
    url(r'^tags/$', 'tags', name='entry-tags'),
    #url(r'^tag/(?P<slug>.+)', 'tag', name='entry-tag'),

    # Categories:
    url(r'^categories/list/$', ListView.as_view(queryset=Category.objects.all()), name='list-categories'),
    url(r'^category/detail/(?P<pk>\d+)', DetailView.as_view(model=Category), name='detail-category'),
    #url(r'^category/detail/(?P<slug>.+)', DetailView.as_view)
    url(r'^category/create', CategoryCreate.as_view(), name='create-category'),
    url(r'^category/update/(?P<pk>\d+)', login_required(CategoryUpdate.as_view()), name='update-category'),

)#234567891123456789212345678931234567894123456789512345678961234567897123456789
Пример #3
0
# -*- coding: utf-8 -*-
"""Urls for links."""
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.views.generic import DetailView

from views import Links, LinkList, LinkUpdate, LinkCreate #links_by_language
from views import CategoryCreate, CategoryUpdate
from models import Link


urlpatterns = patterns('',
    url(r'^$', login_required(Links.as_view()), name='links'),
    url(r'list^$', login_required(LinkList.as_view()), name='link-list'), # Depricated
    #url(r'^language/$', links_by_language, name='links_list'), # Depricated
    url(r'^update/(?P<pk>\d+)', login_required(LinkUpdate.as_view()),
        name='update-link'),
    url(r'^create/$', LinkCreate.as_view(), name='create-link'),
    url(r'^category/create/$', CategoryCreate.as_view(), name='create-link-category'),
    url(r'^category/update/(?P<slug>.+)/$', login_required(CategoryUpdate.as_view()),
        name='update-link-category'),
    url(r'^category/(?P<category>.+)/$', Links.as_view(), name='links-category'),
    url(r'^(?P<pk>\d+)', DetailView.as_view(model=Link), name="link")
)

Пример #4
0
    url(r"relation/feed", RelationFeed(), name="data-relation-feed"),
    url(r"^relation/(?P<slug>.+)", "relation", name="relation"),
    url(r"^relation/add/$", "add_relation", name="add_relation"),
    url(r"^relation/edit", "edit_relation", name="edit_relation"),
    url(r"^relation/remove", "remove_relation", name="remove_relation"),
    # Alterations:
    ## Class-Views
    url(r"^alterations/list/$", AlterationList.as_view(), name="list-alterations"),
    url(r"^alteration/(?P<pk>\d+)", DetailView.as_view(model=Alteration), name="detail-alteration"),
    ## Function-Views
    url(r"^alterations/$", "alterations", name="alterations"),
    url(r"^alteration/feed/$", AlterationFeed(), name="data-alteration-feed"),
    url(r"^alteration/(?P<slug>d+)", "alteration", name="alteration"),
    # Tags:
    ## Class-Views
    url(r"^tags/list/$", TagList.as_view(), name="list-entry-tags"),  # Shows number of tagged entries.
    url(r"^tag/(?P<pk>\d+)", TagDetail.as_view(), name="entry-tag-detail"),  # Shows list of tagged entries.
    url(r"^tag/(?P<slug>.+)", TagDetail.as_view(), name="entry-tag"),
    ## Function-Views
    url(r"^tags/$", "tags", name="entry-tags"),
    # url(r'^tag/(?P<slug>.+)', 'tag', name='entry-tag'),
    # Categories:
    url(r"^categories/list/$", CategoryList.as_view(), name="list-categories"),
    url(r"^category/detail/(?P<pk>\d+)", DetailView.as_view(model=Category), name="detail-category"),
    # url(r'^category/detail/(?P<slug>.+)', DetailView.as_view)
    url(r"^category/create", CategoryCreate.as_view(), name="create-category"),
    url(r"^category/update/(?P<pk>\d+)", login_required(CategoryUpdate.as_view()), name="update-category"),
    url(r"^category/feed/$", CategoryFeed(), name="data-category-feed"),
    url(r"graph/$", "graph", name="data-graph"),
)  # 234567891123456789212345678931234567894123456789512345678961234567897123456789
Пример #5
0
# -*- coding: utf-8 -*-
"""Urls for links."""
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.views.generic import DetailView

from views import Links, LinkList, LinkUpdate, LinkCreate  #links_by_language
from views import CategoryCreate, CategoryUpdate
from models import Link

urlpatterns = patterns(
    '',
    url(r'^$', Links.as_view(), name='links'),
    url(r'list^$', LinkList.as_view(), name='link-list'),  # Depricated
    #url(r'^language/$', links_by_language, name='links_list'), # Depricated
    url(r'^update/(?P<pk>\d+)',
        login_required(LinkUpdate.as_view()),
        name='update-link'),
    url(r'^create/$', LinkCreate.as_view(), name='create-link'),
    url(r'^category/create/$',
        CategoryCreate.as_view(),
        name='create-link-category'),
    url(r'^category/update/(?P<slug>.+)/$',
        login_required(CategoryUpdate.as_view()),
        name='update-link-category'),
    url(r'^category/(?P<category>.+)/$',
        Links.as_view(),
        name='links-category'),
    url(r'^(?P<pk>\d+)', DetailView.as_view(model=Link), name="link"))
Пример #6
0
    url(r'^tags/list/$', TagList.as_view(),
        name='list-entry-tags'),  # Shows number of tagged entries.
    url(r'^tag/(?P<pk>\d+)', TagDetail.as_view(),
        name='entry-tag-detail'),  # Shows list of tagged entries.
    url(r'^tag/(?P<slug>.+)', TagDetail.as_view(), name='entry-tag'),
    ## Function-Views
    url(r'^tags/$', 'tags', name='entry-tags'),
    #url(r'^tag/(?P<slug>.+)', 'tag', name='entry-tag'),

    # Categories:
    url(r'^categories/list/$', CategoryList.as_view(), name='list-categories'),
    url(r'^category/detail/(?P<pk>\d+)',
        DetailView.as_view(model=Category),
        name='detail-category'),
    #url(r'^category/detail/(?P<slug>.+)', DetailView.as_view)
    url(r'^category/create', CategoryCreate.as_view(), name='create-category'),
    url(r'^category/update/(?P<pk>\d+)',
        login_required(CategoryUpdate.as_view()),
        name='update-category'),
    url(r'^category/feed/$', CategoryFeed(), name='data-category-feed'),
    url(r'^graph/$', login_required('graph'), name='data-graph'),
    url(r'map/$', 'hierarchy', {'template': 'data/map.html'}, name='data-map'),
    url(r'vivagraph/(?P<slug>[a-zA-Z\_]+)',
        VivaGraph.as_view(),
        name='data-vivagraph'),
    url(r'vivagraph/(?P<pk>\d?)', VivaGraph.as_view(), name='data-vivagraph'),
    url(r'viva/(?P<pk>\d?)', 'vivagraph', name='vivagraph'),

    # url(r'dictionary/$', DictionaryView.as_view(), name='dictionary')
    url(r'rendering/$', 'rendering', name='rendering'),
    url(r'download/(?P<pk>\d+)', 'download', name='download'),