On 14 Mrz., 22:42, Dirk Eschler wrote:
> Am Samstag 14 März 2009 22:29:16 schrieb Dirk Eschler:
>
> > def get_img_storage_path(instance, filename):
> > return '%salbums/images/%s/' % (settings.MEDIA_ROOT, instance.album.pk)
>
> Forgot the filename in my example...
>
> def get_img_storage_pa
Am Samstag 14 März 2009 22:29:16 schrieb Dirk Eschler:
> def get_img_storage_path(instance, filename):
> return '%salbums/images/%s/' % (settings.MEDIA_ROOT, instance.album.pk)
Forgot the filename in my example...
def get_img_storage_path(instance, filename):
return '%salbums/images/%s/%
Am Samstag 14 März 2009 22:13:39 schrieb Christoph Wegscheider:
> Hi,
> I want to upload photos to directories structured by the album primary
> key. I have the following model:
>
> class Photo(models.Model):
> album = models.ForeignKey(Album)
> img = models.FileField(upload_to='albums/ima
On Sat, Mar 14, 2009 at 4:13 PM, Christoph Wegscheider <
christoph.wegschei...@gmail.com> wrote:
>
> Hi,
> I want to upload photos to directories structured by the album primary
> key. I have the following model:
>
> class Photo(models.Model):
>album = models.ForeignKey(Album)
>img = model
4 matches
Mail list logo