|
@@ -14,6 +14,7 @@ import cStringIO as StringIO |
|
|
from .models import User, Place, Tiers, Event, SallePhy |
|
|
from .models import User, Place, Tiers, Event, SallePhy |
|
|
from .blenderthumbnailer import blend_extract_thumb, write_png |
|
|
from .blenderthumbnailer import blend_extract_thumb, write_png |
|
|
from jm2l.const import CurrentYear |
|
|
from jm2l.const import CurrentYear |
|
|
|
|
|
from slugify import slugify |
|
|
|
|
|
|
|
|
MIN_FILE_SIZE = 1 # bytes |
|
|
MIN_FILE_SIZE = 1 # bytes |
|
|
MAX_FILE_SIZE = 500000000 # bytes |
|
|
MAX_FILE_SIZE = 500000000 # bytes |
|
@@ -128,7 +129,7 @@ class MediaPath(): |
|
|
if media_table=='tiers': |
|
|
if media_table=='tiers': |
|
|
slug = Tiers.by_id(linked_id).slug |
|
|
slug = Tiers.by_id(linked_id).slug |
|
|
if media_table=='place': |
|
|
if media_table=='place': |
|
|
slug = Place.by_id(linked_id).slug |
|
|
|
|
|
|
|
|
slug = Place.by_id(linked_id).slug or slugify(Place.by_id(linked_id).name) |
|
|
if media_table=='salle': |
|
|
if media_table=='salle': |
|
|
slug = SallePhy.by_id(linked_id).slug |
|
|
slug = SallePhy.by_id(linked_id).slug |
|
|
p = IMAGEPATH + [ media_table, slug ] |
|
|
p = IMAGEPATH + [ media_table, slug ] |
|
|