예제 #1
0
from django.conf.urls.defaults import *

from storage.views import IndexView

urlpatterns = patterns('storage.views',
    url(r'^$', IndexView.as_view()),
    url(r'^list-files/(?:(?P<page_num>\d+)/)?$', 'list_files', name='list_files'),
    url(r'^upload/$', 'upload'),
    url(r'^file/(?P<id>\d+)/$', 'fileinfo'),
    url(r'^share/(?P<id>\d+)/$', 'share'),
    url(r'^publish/(?P<id>\d+)/$', 'change_publish'),
    url(r'^delete/(?P<id>\d+)/$', 'delete')
)
예제 #2
0
파일: urls.py 프로젝트: jaroxx/car-django
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from contact.views import MessageAddView
from storage.views import CopiesListView, IndexView
from django.conf.urls.static import static
from django.conf import settings
from buy.views import CarBuyView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^storage/', include('storage.urls', namespace='storage')),
    url(r'^contact/$', MessageAddView.as_view(), name='contact'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^buy/', include('buy.urls', namespace='buy')),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
예제 #3
0
from django.urls import path
from storage.views import IndexView
from storage.views import StoragelistJsonView
from storage.views import StorageCreateView
from storage.views import StorageDetailView
from storage.views import StorageUpdateView
from storage.views import DownloadFileView
from storage.views import StorageViewContentView
from storage.views import StorageViewContentJsonView
from storage.views import StorageImageDetailView
from storage.views import StorageDownloadImageView
from storage.views import StorageDownloadImageMetadataJsonView
from storage.views import StorageObtainJsonListView

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('create/', StorageCreateView.as_view(), name='create'),
    path('<int:pk>/', StorageDetailView.as_view(), name='detail'),
    path('<int:pk>/update/', StorageUpdateView.as_view(), name='update'),
    path('<int:pk>/content/', StorageViewContentView.as_view(), name='content'),
    path('<int:pk>/content/json/', StorageViewContentJsonView.as_view(), name='content-json'),
    path('<int:pk>/file/<str:file_name>/download/', DownloadFileView.as_view(), name='download-file'),
    path('<int:pk>/image/<str:name>/detail/', StorageImageDetailView.as_view(), name='image-detail'),
    path('<int:pk>/image/<str:image_name>/download/', StorageDownloadImageView.as_view(), name='image-download'),
    path('<int:pk>/image/<str:name>/metadata/', StorageDownloadImageMetadataJsonView.as_view(), name='metadata-download'),

    # This method is used by /static/js/formBuilder.js 
    # In lines 193
    # to ask for a posted storage unit id
    path('json/', StoragelistJsonView.as_view(), name='as_json'),
    # This method is used by /static/js/formBuilder.js