コード例 #1
0
ファイル: urls.py プロジェクト: Bananarchist/skateboards
    url(r'^s?/?$', CategoryList.as_view(), name='list'),
    url(r'^/(?P<pk>\d+)/?$', ThreadDetail.as_view(), name='view'),
    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(
    '',
コード例 #2
0
ファイル: urls.py プロジェクト: pombredanne/denigma
    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
ファイル: urls.py プロジェクト: AaronMBrown/denigma
    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
コード例 #4
0
ファイル: urls.py プロジェクト: denigma/denigma
# -*- 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")
)

コード例 #5
0
ファイル: urls.py プロジェクト: al-layth/denigma
# -*- 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"))