Beispiel #1
0
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

media_path = os.path.realpath('media/attachments/')

urlpatterns = []

urlpatterns += format_suffix_patterns(
    patterns('',
        url(r'^$', home, name='home'),
        
        #url(r'^search/', include('haystack.urls')),

        url(r'^users/$', UserList.as_view(), name="user-list"),
        url(r'^user/(?P<pk>[0-9]+)/$', UserDetail.as_view(), name="user-detail"),

        #url(r'^userprofiles/$', UserProfileList.as_view(), name="userprofile-list"),
        url(r'^userprofiles/$', user_profiles, name="userprofile-list"),
        #url(r'^userprofiles/(?P<pk>[0-9]+)/$', UserProfileDetail.as_view(), name="userprofile-detail"),
        url(r'^userprofiles/(?P<pk>[0-9]+)/$', user_view, name="userprofile-detail"),

        url(r'^projects/$', projects_list, name="projects-list"),
        url(r'^projects/(?P<pk>[0-9]+)/$', project_view, name="project-detail"),
        url(r'^projects/(?P<pk>[0-9]+)/participants$', project_participants, name="project-participants"),
        url(r'^projects/(?P<pk>[0-9]+)/discussions$', project_discussions, name="project-discussions"),
        url(r'^projects/(?P<pk>[0-9]+)/discussions/(?P<did>[0-9]+)$', discussion_view, name="project-discussions"),

        #url(r'^pieces/$', PieceList.as_view(), name="piece-list"),
        #url(r'^piece/(?P<pk>[0-9]+)/$', PieceDetail.as_view(), name="piece-detail"),
Beispiel #2
0
        url(r'^collections/$', CollectionList.as_view(), name="collection-list", kwargs={'model': "Collection"}),
        url(r'^collection/(?P<pk>[0-9]+)/$', CollectionDetail.as_view(), name="collection-detail", kwargs={'model': "Collection"}),
        url(r'^collection/create/', CollectionCreate.as_view(), name="collection-create", kwargs={'model': "Collection"}),
        url(r'^collection/(?P<pk>[0-9]+)/update/$', CollectionUpdate.as_view(), name="collection-update", kwargs={'model': "Collection"}),
        url(r'^collection/(?P<pk>[0-9]+)/elements/$', CollectionElements.as_view(), name="collection-elements", kwargs={'model': "Collection"}),
        url(r'^collection/(?P<pk>[0-9]+)/curators/$', CollectionCurators.as_view(), name="collection-curators", kwargs={'model': "Collection"}),
        url(r'^collections/mine/$', MyCollections.as_view(), name="my-collections", kwargs={'model': "Collection"}),

        url(r'^composers/$', ComposerList.as_view(), name="composer-list", kwargs={'model': "Composer"}),
        url(r'^composer/(?P<pk>[0-9]+)/$', ComposerDetail.as_view(), name="composer-detail", kwargs={'model': "Composer"}),

        url(r'^movements/$', MovementList.as_view(), name="movement-list", kwargs={'model': "Movement"}),
        url(r'^movement/(?P<pk>[0-9]+)/$', MovementDetail.as_view(), name="movement-detail", kwargs={'model': "Movement"}),

        url(r'^users/$', UserList.as_view(), name="user-list", kwargs={'model': "User"}),

        url(r'^about/$', about, name='about'),

        url(r'^contact/$', contact, name="contact"),

        url(r'^suggest/$', solr_suggest),

        url(r'^media/(?P<pk>.*)$', MediaServeView.as_view(), name="media"),
        ]
)

# Serving static files
urlpatterns += static.static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += staticfiles_urlpatterns()