On 14 Mrz., 22:42, Dirk Eschler <dirk.esch...@gmx.net> 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_path(instance, filename):
> return '%salbums/images/%s/%s' % (settings.MEDIA_ROOT, instance.album.pk,
> filename)
>
> --
> Dirk Eschler <dirk.esch...@gmx.net>http://www.krusader.org
Hi Dirk,
exactly the solution I was looking for. Thank you (and Dirk) very
much.
I tried it meanwhile and stumbled over the filename myself :),
additionally I omitted the MEDIA_ROOT part as it seems to be done
automatically. If I use it, the img.url output is wrong (shows the
absolute path instead of the relative one).
Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---