예제 #1
0
파일: urls.py 프로젝트: pombredanne/denigma
                  ChangeList, \
                  RelationCreate, RelationUpdate, \
                  CategoryCreate, CategoryUpdate, TagDetail


urlpatterns = patterns('data.views',
    url(r'^$', 'index', name='data'),

    # Entries:
    ## Class-Views
    url(r'^entries/list/$', EntryList.as_view(paginate_by=10), name='list-entries'),
    url(r'^entry/table/$', EntryList.as_view(template_name='data/entry_table.html'), name='entry-table'),
    url(r'^entry/(?P<pk>\d+)', DetailView.as_view(model=Entry), name='detail-entry'), # User generic class-based view # template_name='entry_detail.html' # use defaults
    url(r'^entry/view/(?P<slug>.+)', EntryView.as_view(), name='view-entry'),
    url(r'^entry/create/$', EntryCreate.as_view(), name='create-entry'),
    url(r'^entry/update/(?P<pk>\d+)', login_required(EntryUpdate.as_view()), name='update-entry'),
    url(r'^entry/update/(?P<slug>.+)', login_required(EntryUpdate.as_view()), name='update-entry'),
    url(r'^entry/delete/(?P<pk>\d+)', login_required(EntryDelete.as_view()), name='delete-entry'),
    url(r'^entry/(?P<slug>.+)', EntryView.as_view(), name='detail-entry'), #  Alternative detail entry accepting slug.
    url(r'^hierarchy/list/$', EntryList.as_view(
        context_object_name='entries',
        template_name='data/hierarchy.html'),
        name='list-hierarchy'),

    ## Function-Views:
    url(r'^entries/$', 'entries', name='entries'),
    url(r'^hierarchy/$', 'hierarchy', name='hierarchy'),
    url(r'^entry/(?P<slug>.+)', 'entry', name='data_entry'), # Classic view.
    url(r'^entry/add', 'add_entry', name='add_entry'),
    url(r'^entry/edit', 'edit_entry', name='edit_view'),
    url(r'^entry/remove', 'remove_entry', name='remove_entry'),
예제 #2
0
파일: urls.py 프로젝트: al-layth/denigma
    url(r'^entry/table/$',
        Entries.as_view(template_name='data/entry_table.html'),
        name='entry-table'),
    #url(r'^entry/table/$', EntryList.as_view(template_name='data/entry_table.html'), name='entry-table'),
    url(
        r'^entry/(?P<pk>\d+)$',
        DetailView.as_view(model=Entry),
        name='detail-entry'
    ),  # User generic class-based view # template_name='entry_detail.html' # use defaults
    url(r'^entry/view/(?P<slug>.+)', EntryView.as_view(), name='view-entry'),
    url(r'^entry/create/$', EntryCreate.as_view(), name='create-entry'),
    url(r'^entry/generate/(?P<title>.+)',
        login_required(Generate.as_view()),
        name='generate-entry'),
    url(r'^entry/update/(?P<pk>\d+)',
        login_required(EntryUpdate.as_view()),
        name='update-entry'),
    url(r'^entry/update/(?P<slug>.+)',
        login_required(EntryUpdate.as_view()),
        name='update-entry'),
    url(r'^entry/delete/(?P<pk>\d+)',
        login_required(EntryDelete.as_view()),
        name='delete-entry'),
    url(r'^entry/feed/$', EntryFeed(), name='data-entry-feed'),
    url(r'^entry/(?P<slug>.+)', EntryView.as_view(),
        name='detail-entry'),  #  Alternative detail entry accepting slug.
    url(r'^hierarchy/list/$', HierarchyList.as_view(), name='list-hierarchy'),

    ## Function-Views:
    url(r'^entries/$', 'entries', name='entries'),
    url(r'^hierarchy/$', 'hierarchy', name='hierarchy'),
예제 #3
0
파일: urls.py 프로젝트: AaronMBrown/denigma
urlpatterns = patterns(
    "data.views",
    url(r"^$", "index", name="data"),
    # Entries:
    ## Class-Views
    url(r"^entries/list/$", EntryList.as_view(paginate_by=20), name="list-entries"),
    url(r"^entry/table/$", Entries.as_view(template_name="data/entry_table.html"), name="entry-table"),
    # url(r'^entry/table/$', EntryList.as_view(template_name='data/entry_table.html'), name='entry-table'),
    url(
        r"^entry/(?P<pk>\d+)", DetailView.as_view(model=Entry), name="detail-entry"
    ),  # User generic class-based view # template_name='entry_detail.html' # use defaults
    url(r"^entry/view/(?P<slug>.+)", EntryView.as_view(), name="view-entry"),
    url(r"^entry/create/$", EntryCreate.as_view(), name="create-entry"),
    url(r"^entry/generate/(?P<title>.+)", Generate.as_view(), name="generate-entry"),
    url(r"^entry/update/(?P<pk>\d+)", login_required(EntryUpdate.as_view()), name="update-entry"),
    url(r"^entry/update/(?P<slug>.+)", login_required(EntryUpdate.as_view()), name="update-entry"),
    url(r"^entry/delete/(?P<pk>\d+)", login_required(EntryDelete.as_view()), name="delete-entry"),
    url(r"^entry/feed/$", EntryFeed(), name="data-entry-feed"),
    url(r"^entry/(?P<slug>.+)", EntryView.as_view(), name="detail-entry"),  #  Alternative detail entry accepting slug.
    url(r"^hierarchy/list/$", HierarchyList.as_view(), name="list-hierarchy"),
    ## Function-Views:
    url(r"^entries/$", "entries", name="entries"),
    url(r"^hierarchy/$", "hierarchy", name="hierarchy"),
    url(r"^entry/(?P<slug>.+)", "entry", name="data_entry"),  # Classic view.
    url(r"^entry/add", "add_entry", name="add_entry"),
    url(r"^entry/edit", "edit_entry", name="edit_view"),
    url(r"^entry/remove", "remove_entry", name="remove_entry"),
    url(
        r"^entry/breadcrump/(?P<slug>.+)", "breadcrump", name="breadcrump"
    ),  # An experimental view to display breadcrump.
예제 #4
0
파일: urls.py 프로젝트: twoolie/blogalog
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import permission_required
from views import EntryVisibleListView, EntryDetailView, LatestEntriesFeed, EntryCreate, EntryUpdate

urlpatterns = patterns('blogalog.views', 
    url(r'^$', EntryVisibleListView.as_view(
            context_object_name='latest_blog_entries',
        ), 
        name='entry-list'
    ),
    url(r'^feed/?$', LatestEntriesFeed()),
    url(r'^entry/(?P<pk>\d+)/?$', EntryDetailView.as_view(
            context_object_name='entry',
        ), 
        name='entry-detail',
    ),
    url(r'^entry/add/?$', permission_required('blogalog.add_entry')(EntryCreate.as_view()), name='entry-add'),
    url(r'^entry/update/(?P<pk>\d+)/?$', permission_required('blogalog.change_entry')(EntryUpdate.as_view()), name='entry-update'),
)