PJ
[auf_rh_dae.git] / project / rh / models.py
index cf8e68d..6ceaa28 100644 (file)
@@ -35,19 +35,19 @@ 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 = "%s/poste/%s/%s" % (instance._meta.app_label, instance.poste_id, filename)
     return path
 
 def dossier_piece_dispatch(instance, filename):
-    path = "dossier/%s/%s" % (instance.dossier_id, filename)
+    path = "%s/dossier/%s/%s" % (instance._meta.app_label, instance.dossier_id, filename)
     return path
 
 def employe_piece_dispatch(instance, filename):
-    path = "employe/%s/%s" % (instance.employe_id, filename)
+    path = "%s/employe/%s/%s" % (instance._meta.app_label, instance.employe_id, filename)
     return path
 
 def contrat_dispatch(instance, filename):
-    path = "contrat/%s/%s" % (instance.dossier_id, filename)
+    path = "%s/contrat/%s/%s" % (instance._meta.app_label, instance.dossier_id, filename)
     return path