storage_prive = FileSystemStorage(settings.PRIVE_MEDIA_ROOT, base_url=settings.PRIVE_MEDIA_URL)
def poste_piece_dispatch(instance, filename):
- path = "poste/%s/%s" % (instance.poste.id, filename)
+ path = "poste/%s/%s" % (instance.poste_id, filename)
return path
def dossier_piece_dispatch(instance, filename):
- path = "dossier/%s/%s" % (instance.dossier.id, filename)
+ path = "dossier/%s/%s" % (instance.dossier_id, filename)
return path
(r'^deconnexion/$', 'django.contrib.auth.views.logout'),
(r'^dae/', include('project.dae.urls')),
(r'^', include('project.rh.urls')),
-
+ (r'^prive/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.PRIVE_MEDIA_ROOT}),
)
if settings.DEBUG: