]> git.parisson.com Git - teleforma.git/commitdiff
add private files, fix urls
authoryomguy <yomguy@parisson.com>
Wed, 4 Apr 2012 22:14:49 +0000 (00:14 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 4 Apr 2012 22:14:49 +0000 (00:14 +0200)
example/settings.py
example/urls.py
teleforma/urls.py

index 4c38b4d4ade3f4675b32e344cc83235259eadf53..e169232cdbc4a30ad7498561cac1ad503ea73c30 100644 (file)
@@ -136,6 +136,7 @@ INSTALLED_APPS = (
     'django_extensions',
     'pagination',
     'postman',
+    'private_files',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
@@ -167,3 +168,4 @@ DEFAULT_FROM_EMAIL = 'webmaster@parisson.com'
 
 POSTMAN_AUTO_MODERATE_AS=True
 
+FILE_PROTECTION_METHOD = 'basic'
index cd4c29c005e88c60459510d1e09052a9965ddf7e..2166f3a741d60da39f6a515ef7cda0a6d2e0179a 100644 (file)
@@ -16,19 +16,11 @@ urlpatterns = patterns('',
     # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
     # to INSTALLED_APPS to enable admin documentation:
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
-    # Uncomment the next line to enable the admin:
-    (r'^admin/django/', include(admin.site.urls)),
-
-    # Telemeta
-    (r'^', include('telemeta.urls')),
+    url(r'^admin/django/', include(admin.site.urls)),
 
     # TeleForma
     (r'^', include('teleforma.urls')),
 
-    # Postman
-    (r'^messages/', include('postman.urls')),
-
     # Languages
     (r'^i18n/', include('django.conf.urls.i18n')),
     (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
index 8094631a86147cad213aac646297e204e5f39bf5..ce887552cc34a0e2786d621df930ddb5c605d8aa 100644 (file)
@@ -44,12 +44,19 @@ htdocs_forma = os.path.dirname(__file__) + '/htdocs'
 
 urlpatterns = patterns('',
 
+    # Telemeta
+    url(r'^', include('telemeta.urls')),
+
     url(r'^desk/courses/$', CoursesView.as_view(), name="teleforma-courses"),
     url(r'^desk/courses/(?P<pk>.*)$', CourseView.as_view(), name="teleforma-course-detail"),
     url(r'^desk/medias/(?P<pk>.*)$', MediaView.as_view(), name="teleforma-media-detail"),
     url(r'^desk/documents/(?P<pk>.*)/download/', document_download, name="teleforma-document-download"),
     url(r'^desk/documents/(?P<pk>.*)/view/', document_view, name="teleforma-document-view"),
 
+    # Postman
+    url(r'^messages/', include('postman.urls')),
+
+
 # CSS+Images (FIXME: for developement only)
     url(r'^teleforma/css/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': htdocs_forma+'/css'},
@@ -64,4 +71,7 @@ urlpatterns = patterns('',
 # JSON RPC
     url(r'json/$', jsonrpc_site.dispatch, name='jsonrpc_mountpoint'),
 
+    url(r'^private_files/', include('private_files.urls')),
+
+
 )