Beispiel #1
0
from django.conf.urls import patterns, url

from documents.views import (DocumentDetailView, ExportDocumentView,
                             DocumentForksView, DocumentStarsView,
                             NewDocumentView, MyDocumentsView, DocumentEditView,
                             ForkDocumentView, StarDocumentView,
                             SearchDocumentView)

urlpatterns = patterns(
    '',
    url(r'^$', MyDocumentsView.as_view(), name='my_documents'),
    url(r'^search$', SearchDocumentView.as_view(), name='search_document'),
    url(r'^new$', NewDocumentView.as_view(), name='new_document'),
    url(r'^(?P<slug>[-\w]+)/$', DocumentDetailView.as_view(),
        name='show_document'),
    url(r'^(?P<slug>[-\w]+)/forks$', DocumentForksView.as_view(),
        name='show_document_forks'),
    url(r'^(?P<slug>[-\w]+)/stars', DocumentStarsView.as_view(),
        name='show_document_stars'),
    url(r'^(?P<slug>[-\w]+)/export/(?P<exporter>[-\w]+)$',
        ExportDocumentView.as_view(), name='export_document'),
    url(r'^(?P<slug>[-\w]+)/edit$', DocumentEditView.as_view(),
        name='edit_document'),
    url(r'^(?P<slug>[-\w]+)/fork$', ForkDocumentView.as_view(),
        name='fork_document'),
    url(r'^(?P<slug>[-\w]+)/star$', StarDocumentView.as_view(),
        name='star_document'),
)
Beispiel #2
0
     SearchView.as_view(),
     name='documents.search'),
 url(r'^list/$',
     DocumentList.as_view(),
     name='documents.list'),
 url(r'^list/missed/$',
     MissedDocumentList.as_view(),
     name='documents.list.missed'),
 url(r'^list/lend/$',
     LendDocumentList.as_view(),
     name='documents.list.lend'),
 url(r'^list/nonuserlend/(?P<nonuser>\d+)/$',
     NonUserLendDocumentList.as_view(),
     name='documents.list.nonuserlend'),
 url(r'^view/(?P<pk>\w\d+)/$',
     DocumentDetailView.as_view(),
     name='documents.detail'),
 url(r'^lend/(?P<pk>\w\d+)/$',
     lend,
     name='documents.lend'),
 url(r'^missing/(?P<pk>\w\d+)/$',
     missing,
     name='documents.miss'),
 url(r'^lost/(?P<pk>\w\d+)/$',
     lost,
     name='documents.lost'),
 url(r'^unlend/(?P<pk>\w\d+)/$',
     unlend,
     name='documents.unlend'),
 url(r'^edit/(?P<pk>\w\d+)/$',
     DocumentChangeView.as_view(),
Beispiel #3
0
from django.conf.urls import patterns, url

from documents.views import (DocumentDetailView, ExportDocumentView,
                             DocumentForksView, DocumentStarsView,
                             NewDocumentView, MyDocumentsView,
                             DocumentEditView, ForkDocumentView,
                             StarDocumentView, SearchDocumentView)

urlpatterns = patterns(
    '',
    url(r'^$', MyDocumentsView.as_view(), name='my_documents'),
    url(r'^search$', SearchDocumentView.as_view(), name='search_document'),
    url(r'^new$', NewDocumentView.as_view(), name='new_document'),
    url(r'^(?P<slug>[-\w]+)/$',
        DocumentDetailView.as_view(),
        name='show_document'),
    url(r'^(?P<slug>[-\w]+)/forks$',
        DocumentForksView.as_view(),
        name='show_document_forks'),
    url(r'^(?P<slug>[-\w]+)/stars',
        DocumentStarsView.as_view(),
        name='show_document_stars'),
    url(r'^(?P<slug>[-\w]+)/export/(?P<exporter>[-\w]+)$',
        ExportDocumentView.as_view(),
        name='export_document'),
    url(r'^(?P<slug>[-\w]+)/edit$',
        DocumentEditView.as_view(),
        name='edit_document'),
    url(r'^(?P<slug>[-\w]+)/fork$',
        ForkDocumentView.as_view(),
        name='fork_document'),
Beispiel #4
0
from django.conf.urls import include, patterns, url

from documents.resources import DocumentResource
from documents.views import (
    HomeView,
    DocumentDetailView,
    DocumentForksView,
    NewDocumentView,
    MyDocumentsView,
    DocumentEditView,
    ForkDocumentView,
    StarDocumentView,
)

urlpatterns = patterns(
    "",
    url(r"^$", HomeView.as_view(), name="home"),
    url(r"^my-documents/$$", MyDocumentsView.as_view(), name="my_documents"),
    url(r"^new/$$", NewDocumentView.as_view(), name="new_document"),
    url(r"^show/(?P<slug>[-\w]+)/$", DocumentDetailView.as_view(), name="show_document"),
    url(r"^show/(?P<slug>[-\w]+)/forks$", DocumentForksView.as_view(), name="show_document_forks"),
    url(r"^edit/(?P<slug>[-\w]+)/$", DocumentEditView.as_view(), name="edit_document"),
    url(r"^fork/(?P<slug>[-\w]+)/$", ForkDocumentView.as_view(), name="fork_document"),
    url(r"^star/(?P<slug>[-\w]+)/$", StarDocumentView.as_view(), name="star_document"),
    # api
    url(r"^api/", include(DocumentResource().urls)),
)
Beispiel #5
0
from django.conf.urls import patterns, url

from documents.views import (DocumentDetailView, ExportDocumentView, DocumentForksView,
                             DocumentStarsView, NewDocumentView, MyDocumentsView, DocumentEditView,
                             ForkDocumentView, StarDocumentView, SearchDocumentView)

urlpatterns = patterns('',

    url(r'^$', MyDocumentsView.as_view(), name='my_documents'),
    url(r'^search$', SearchDocumentView.as_view(), name='search_document'),
    url(r'^new$', NewDocumentView.as_view(), name='new_document'),
    url(r'^(?P<slug>[-\w]+)/$', DocumentDetailView.as_view(), name='show_document'),
    url(r'^(?P<slug>[-\w]+)/forks$', DocumentForksView.as_view(), name='show_document_forks'),
    url(r'^(?P<slug>[-\w]+)/stars', DocumentStarsView.as_view(), name='show_document_stars'),
    url(r'^(?P<slug>[-\w]+)/export/(?P<exporter>[-\w]+)$', ExportDocumentView.as_view(), name='export_document'),
    url(r'^(?P<slug>[-\w]+)/edit$', DocumentEditView.as_view(), name='edit_document'),
    url(r'^(?P<slug>[-\w]+)/fork$', ForkDocumentView.as_view(), name='fork_document'),
    url(r'^(?P<slug>[-\w]+)/star$', StarDocumentView.as_view(), name='star_document'),


)
Beispiel #6
0
from django.conf.urls import patterns, url

from documents.views import (HomeView, DocumentDetailView, ExportDocumentView, DocumentForksView,
                             DocumentStarsView, NewDocumentView, MyDocumentsView, DocumentEditView,
                             ForkDocumentView, StarDocumentView, SearchDocumentView)

urlpatterns = patterns('',

    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^my-documents/$$', MyDocumentsView.as_view(), name='my_documents'),
    url(r'^search/$$', SearchDocumentView.as_view(), name='search_document'),
    url(r'^new/$$', NewDocumentView.as_view(), name='new_document'),
    url(r'^show/(?P<slug>[-\w]+)/$', DocumentDetailView.as_view(), name='show_document'),
    url(r'^show/(?P<slug>[-\w]+)/forks$', DocumentForksView.as_view(), name='show_document_forks'),
    url(r'^show/(?P<slug>[-\w]+)/stars', DocumentStarsView.as_view(), name='show_document_stars'),
    url(r'^export/(?P<slug>[-\w]+)/(?P<exporter>[-\w]+)', ExportDocumentView.as_view(), name='export_document'),
    url(r'^edit/(?P<slug>[-\w]+)/$', DocumentEditView.as_view(), name='edit_document'),
    url(r'^fork/(?P<slug>[-\w]+)/$', ForkDocumentView.as_view(), name='fork_document'),
    url(r'^star/(?P<slug>[-\w]+)/$', StarDocumentView.as_view(), name='star_document'),

)
from django.conf.urls.defaults import *
from documents.views import DocumentDetailView
from django.views.generic import ListView
from documents.models import Document


urlpatterns = patterns('documents.views',
    #url(r'^$', 'explore',name="documents-explore"),
    url(r'^$',ListView.as_view(model=Document,template_name="documents/document_list.jade"), name="document_list"),
    url(r'^(?P<pk>\d+)$',DocumentDetailView.as_view(),name="document_detail"),
    url(r'^(?P<pk>\d+)/editar$', 'edit',name="document_edit"),
    url(r'^(?P<pk>\d+)/eliminar$', 'delete',name="document_delete"),
    url(r'^(?P<pk>\d+)/descargar/(?P<format>pdf|latex)', 'download',name="document_download"),
    url(r'^(?P<pk>\d+)/thumb/(?P<size>\w+)/(?P<i>\d+)$', 'thumb',name="document_thumb"),
    url(r'^nuevo$', 'edit',name="document_create"),
    #url(r'^(?P<pk>\d+)/descarga$', 'download',name="document_download"),
)