urls.py 1.01 KB
Newer Older
1 2 3 4 5 6
from django.conf.urls import patterns, url
from annotations import views


# /!\ urls patterns here are *without* the trailing slash

7 8 9
urlpatterns = [
    
        # json:title,id,authors,journal,
10 11 12
    #      publication_date
    #      abstract_text,full_text
    url(r'^documents/(?P<doc_id>[0-9]+)$', views.Document.as_view()), # document view
Romain Loth's avatar
Romain Loth committed
13 14 15 16
    
    # GET: 
    #    was : lists ∩ document   (ngram_ids intersection if connected to list node_id and doc node_id)
    #    fixed 2016-01: just lists (because document doesn't get updated by POST create cf. ngram.lists.DocNgram filter commented)
17 18 19 20 21 22 23
    url(r'^corpora/(?P<corpus_id>[0-9]+)/documents/(?P<doc_id>[0-9]+)$', views.NgramList.as_view()), # the list associated with an ngram

    # 2016-03-24: refactoring, deactivated NgramEdit and NgramCreate
    #
    # url(r'^lists/(?P<list_id>[0-9]+)/ngrams/(?P<ngram_ids>[0-9,\+]+)+$', views.NgramEdit.as_view()),
    # POST (fixed 2015-12-16)
    # url(r'^lists/(?P<list_id>[0-9]+)/ngrams/create$', views.NgramCreate.as_view()), #
24
]