from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from restful import student_restful from views import (MainView, AddDeliveryView, FileUploadView, AssignmentGroupView, FileDownloadView, ShowDeliveryView, CompressedFileDownloadView, TarFileDownloadView) urlpatterns = patterns('devilry.apps.student', url(r'^$', login_required(MainView.as_view()), name='student'), url(r'^add-delivery/(?P<assignmentgroupid>\d+)$', login_required(AddDeliveryView.as_view()), name='add-delivery'), url(r'^add-delivery/fileupload/(?P<assignmentgroupid>\d+)$', login_required(FileUploadView.as_view()), name='file-upload-id'), url(r'^add-delivery/fileupload/(?P<assignmentgroupid>\d+)$', login_required(FileUploadView.as_view()), name='file-upload'), url(r'^assignmentgroup/(?P<assignmentgroupid>\d+)$', login_required(AssignmentGroupView.as_view()), name='student-show-assignmentgroup'), url(r'^show-delivery/(?P<deliveryid>\d+)$', login_required(ShowDeliveryView.as_view()), name='show-delivery'), url(r'^show-delivery/filedownload/(?P<filemetaid>\d+)$', login_required(FileDownloadView.as_view()), name='file-download'), url(r'^show-delivery/compressedfiledownload/(?P<deliveryid>\d+)$', login_required(CompressedFileDownloadView.as_view()),
"""msgparser URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from views import FileUploadView, Home urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', Home.as_view(), name='home'), url(r'email/parse/$', FileUploadView.as_view(), name="email-parse"), ]
from views import GetUserFriendsView from django.contrib.auth.decorators import login_required from registration.backends.default.urls import * from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic.simple import direct_to_template from django.core.urlresolvers import reverse # momends web manager urls urlpatterns = patterns('', url(r'^$', MainRedirectView.as_view(), name='front-page'), # redirect to /home if auth is ok, otherwise redirect to /main url(r'^main/$', HomePageNotLoggedView.as_view(), name='main-screen'), url(r'^home/$', login_required(HomePageLoggedFormView.as_view()), name='home-screen'), url(r'^user/friends/$', login_required(GetUserFriendsView.as_view()), name='user-friends'), url(r'^user/(?P<id>\d+)/$', login_required(UserProfileTemplateView.as_view()), name='user-screen'), url(r'^user/(?P<username>\w+)/$', login_required(UserProfileTemplateView.as_view()), name='user-screen'), url(r'^settings/$', login_required(SettingsFormView.as_view()), name='settings-screen'), url(r'^momendstatus/(?P<id>[\w\-=]+)/$', login_required(MomendStatusView.as_view()), name='momend-status'), url(r'^show/(?P<type>\w{1})/(?P<id>[\w\-=]+)/$', ShowMomendView.as_view(), name='show-momend'), url(r'^play/(?P<type>\w{1})/(?P<id>[\w\-=]+)/$', MomendPlayerView.as_view(), name='play-momend'), url(r'^get/(?P<type>\w{1})/(?P<id>[\w\-=]+)/$', GetMomendView.as_view(), name='get-momend'), url(r'^delete/(?P<type>\w{1})/(?P<id>[\w\-=]+)/$', login_required(DeleteMomendView.as_view()), name='delete-momend'), url(r'^postplay/(?P<id>[\w\-=]+)/$', login_required(SaveInteractionView.as_view()), name='save-interaction'), url(r'^create/$', login_required(CreateMomendView.as_view()), name='create-momend'), url(r'^fileupload/$', login_required(FileUploadView.as_view()), name='file-upload'), url(r'^send/$', SendAnimationAsMail.as_view(), name='send-mail'), url(r'^upload/$', login_required(UploadFormView.as_view()), name='upload'), (r'^robots\.txt$', direct_to_template, {'template': 'robots.txt', 'mimetype': 'text/plain'}), url(r'^users/(?P<username>\w+)/$', login_required(HomePageLoggedFormView.as_view()), name='login-success'), ) urlpatterns += staticfiles_urlpatterns()
from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from restful import student_restful from views import MainView, AddDeliveryView, FileUploadView, AssignmentGroupView urlpatterns = patterns( "devilry.apps.student", url(r"^$", login_required(MainView.as_view()), name="student"), url(r"^add-delivery/(?P<deliveryid>\d+)$", login_required(AddDeliveryView.as_view()), name="add-delivery"), url(r"^add-delivery/fileupload/(?P<deadlineid>\d+)$", login_required(FileUploadView.as_view()), name="file-upload"), url(r"^assignmentgroup/(?P<assignmentgroupid>\d+)$", login_required(AssignmentGroupView.as_view())), ) urlpatterns += student_restful
admin.autodiscover() # Routers provide an easy way of automatically determining the URL conf. router = routers.DefaultRouter(trailing_slash=False) router.register(r'cipe', SedutaCIPEViewSet, base_name='cipe') router.register(r'precipe', SedutaPreCIPEViewSet, base_name='precipe') schema_view = get_swagger_view(title='Area riservata API') urls = [ url(r'^admin/', admin.site.urls), url(r'^', include(router.urls)), url(r'^docs/', schema_view), url(r'^upload_file/(?P<filename>.+)$', FileUploadView.as_view(), name='upload-file'), url(r'^seduta/(?P<tipo>[^/]+)/(?P<id_seduta>.+)$', views.SedutaView.as_view(), name='url-seduta'), url(r'^api-token-auth/', obtain_jwt_token, name='obtain-jwt'), url(r'^api-token-refresh/', refresh_jwt_token, name='refresh-jwt'), url(r'^seduta-precipe/(?P<hash>[^/]+)$', views.PublicView.as_view(), name='seduta-precipe'), url(r'^seduta-cipe/(?P<hash>[^/]+)$', views.PublicView.as_view(), name='seduta-cipe'), url(r'^403$', views.TemplateView.as_view(template_name="403.html"), name='tampering-403'),
MainView, AddDeliveryView, FileUploadView, AssignmentGroupView, FileDownloadView, ShowDeliveryView, CompressedFileDownloadView, ) urlpatterns = patterns( "devilry.apps.student", url(r"^$", login_required(MainView.as_view()), name="student"), url(r"^add-delivery/(?P<assignmentgroupid>\d+)$", login_required(AddDeliveryView.as_view()), name="add-delivery"), url( r"^add-delivery/fileupload/(?P<assignmentgroupid>\d+)$", forbidden_if_not_authenticated(FileUploadView.as_view()), name="file-upload", ), url( r"^assignmentgroup/(?P<assignmentgroupid>\d+)$", login_required(AssignmentGroupView.as_view()), name="student-show-assignmentgroup", ), url(r"^show-delivery/(?P<deliveryid>\d+)$", login_required(ShowDeliveryView.as_view()), name="show-delivery"), url( r"^show-delivery/filedownload/(?P<filemetaid>\d+)$", login_required(FileDownloadView.as_view()), name="file-download", ), url( r"^show-delivery/compressedfiledownload/(?P<deliveryid>\d+)$",
from django.contrib.auth.decorators import login_required from devilry.restful.forbidden import forbidden_if_not_authenticated from restful import student_restful from views import (MainView, AddDeliveryView, FileUploadView, AssignmentGroupView, FileDownloadView, ShowDeliveryView, CompressedFileDownloadView) urlpatterns = patterns( 'devilry.apps.student', url(r'^$', login_required(MainView.as_view()), name='student'), url(r'^add-delivery/(?P<assignmentgroupid>\d+)$', login_required(AddDeliveryView.as_view()), name='add-delivery'), url(r'^add-delivery/fileupload/(?P<assignmentgroupid>\d+)$', forbidden_if_not_authenticated(FileUploadView.as_view()), name='file-upload'), url(r'^assignmentgroup/(?P<assignmentgroupid>\d+)$', login_required(AssignmentGroupView.as_view()), name='student-show-assignmentgroup'), url(r'^show-delivery/(?P<deliveryid>\d+)$', login_required(ShowDeliveryView.as_view()), name='show-delivery'), url(r'^show-delivery/filedownload/(?P<filemetaid>\d+)$', login_required(FileDownloadView.as_view()), name='file-download'), url(r'^show-delivery/compressedfiledownload/(?P<deliveryid>\d+)$', login_required(CompressedFileDownloadView.as_view()), name='compressed-file-download'), #url(r'^show-delivery/tarfiledownload/(?P<deliveryid>\d+)$', #login_required(TarFileDownloadView.as_view()),