Exemple #1
0
from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page
from views import AgencyView, DocketView, DocumentView, EntityView, EntityDocketView, EntitySummaryView, RawTextView, FileProxyView, NotFoundView

from search import DocumentSearchResultsView, FRSearchResultsView, NonFRSearchResultsView, DocketSearchResultsView, EntitySearchResultsView, AgencySearchResultsView, DefaultSearchResultsView

from clustering import DocketHierarchyView, SingleClusterView, DocumentClusterView, DocumentClusterChainView, HierarchyTeaserView

HOUR_CACHE = cache_page(3600)

urlpatterns = patterns('',
    # resource pages
    url(r'^agency/(?P<agency>[A-Z-]+$)', HOUR_CACHE(AgencyView.as_view()), name='agency-view'),
    url(r'^docket/(?P<docket_id>[A-Z0-9_-]+$)', HOUR_CACHE(DocketView.as_view()), name='docket-view'),
    url(r'^document/(?P<document_id>[A-Z0-9_-]+$)', DocumentView.as_view(), name='document-view'),
    url(r'^(?P<type>organization|individual|politician|entity)/(?P<entity_id>[a-f0-9-]+$)', EntityView.as_view(), name='entity-view'),
    # brisket-specific entity endpoints
    url(r'^(?P<entity_type>organization|individual|politician|entity)/(?P<entity_id>[a-f0-9-]+)/(?P<document_type>mentions|submissions)_in_docket/(?P<docket_id>[A-Z0-9_-]+$)', EntityDocketView.as_view(), name='entity-docket-view'),
    url(r'^entity_list$', EntitySummaryView.as_view(), name='entity-list'),
    
    # search
    url(r'^search/document/(?P<query>.*$)', DocumentSearchResultsView.as_view(), name='search-documents-view'),
    url(r'^search/document-fr/(?P<query>.*$)', FRSearchResultsView.as_view(), name='search-fr-documents-view'),
    url(r'^search/document-non-fr/(?P<query>.*$)', NonFRSearchResultsView.as_view(), name='search-non-fr-documents-view'),
    url(r'^search/docket/(?P<query>.*$)', DocketSearchResultsView.as_view(), name='search-dockets-view'),
    url(r'^search/agency/(?P<query>.*$)', AgencySearchResultsView.as_view(), name='search-agency-view'),
    url(r'^search/entity/(?P<query>.*$)', EntitySearchResultsView.as_view(), name='search-entity-view'),
    url(r'^search/(?P<query>.*$)', DefaultSearchResultsView.as_view(), name='search-default-view'),

    # raw text and documents
    url(r'^document/(?P<document_id>[A-Z0-9_-]+)/view_(?P<file_type>[0-9a-z]+)\.(?P<output_format>[0-9a-z]+)$', RawTextView.as_view(), name='raw-text-view', kwargs={'view_type': 'view'}),
Exemple #2
0
from clustering import DocketHierarchyView, SingleClusterView, DocumentClusterView, DocumentClusterChainView, HierarchyTeaserView

HOUR_CACHE = cache_page(3600)

urlpatterns = patterns(
    '',
    # resource pages
    url(r'^agency/(?P<agency>[A-Z-]+$)',
        HOUR_CACHE(AgencyView.as_view()),
        name='agency-view'),
    url(r'^docket/(?P<docket_id>[A-Z0-9_-]+$)',
        HOUR_CACHE(DocketView.as_view()),
        name='docket-view'),
    url(r'^document/(?P<document_id>[A-Z0-9_-]+$)',
        DocumentView.as_view(),
        name='document-view'),
    url(r'^(?P<type>organization|individual|politician|entity)/(?P<entity_id>[a-f0-9-]+$)',
        EntityView.as_view(),
        name='entity-view'),
    # brisket-specific entity endpoints
    url(r'^(?P<entity_type>organization|individual|politician|entity)/(?P<entity_id>[a-f0-9-]+)/(?P<document_type>mentions|submissions)_in_docket/(?P<docket_id>[A-Z0-9_-]+$)',
        EntityDocketView.as_view(),
        name='entity-docket-view'),
    url(r'^entity_list$', EntitySummaryView.as_view(), name='entity-list'),

    # search
    url(r'^search/document/(?P<query>.*$)',
        DocumentSearchResultsView.as_view(),
        name='search-documents-view'),
    url(r'^search/document-fr/(?P<query>.*$)',
Exemple #3
0
'''
Created on Sep 25, 2015

@author: anilkatta
'''

from django.conf.urls import patterns, url
from views import DocumentView
from views import DocumentDetailView
from views import PropertiesList
from django.conf import settings

urlpatterns = patterns('fileupload.views',
    #url(r'^upload_form_serializer/$', 'upload_form_serializer'),
    url(r'^upload_form_serializer/$', DocumentView.as_view()),
    url(r'^documentdetails/$', DocumentDetailView.as_view()),
    url(r'^propkeylist/$', PropertiesList.as_view()),
)
Exemple #4
0
'''
Created on Sep 25, 2015

@author: anilkatta
'''

from django.conf.urls import patterns, url
from views import DocumentView
from views import DocumentDetailView
from views import PropertiesList
from django.conf import settings

urlpatterns = patterns(
    'fileupload.views',
    #url(r'^upload_form_serializer/$', 'upload_form_serializer'),
    url(r'^upload_form_serializer/$', DocumentView.as_view()),
    url(r'^documentdetails/$', DocumentDetailView.as_view()),
    url(r'^propkeylist/$', PropertiesList.as_view()),
)