|
|
@ -62,11 +62,11 @@ def obrazek_filename_maly(self, filename): |
|
|
|
|
|
|
|
def obrazek_filename_obecny(self, filename, typ): |
|
|
|
gal = self.galerie |
|
|
|
cislo_gal = force_unicode(gal.pk) |
|
|
|
cesta = "" |
|
|
|
while(not gal.soustredeni): |
|
|
|
cesta = os.path.join(force_unicode(gal.nazev), cesta) |
|
|
|
gal = gal.galerie_up |
|
|
|
return os.path.join('Galerie', force_unicode(gal.soustredeni), cesta, typ, force_unicode(self.nazev)) |
|
|
|
return os.path.join('Galerie', "soustredeni_" + force_unicode(gal.soustredeni.pk), "galerie_" + cislo_gal, typ, force_unicode(self.nazev)) |
|
|
|
|
|
|
|
class Obrazek(models.Model): |
|
|
|
obrazek_velky = models.ImageField(upload_to=obrazek_filename, |
|
|
|