Am Freitag, 25. Mai 2007 10:51 schrieb Thomas Güttler:
> Hi,
>
> the upload_to argument to FileField evals strftime formatting.
>
> I would like to have the ID of the belonging row.
>
> Example: One MyObject has N attachments.
>
> class Attachment(models.Model):
>
Hi,
the upload_to argument to FileField evals strftime formatting.
I would like to have the ID of the belonging row.
Example: One MyObject has N attachments.
class Attachment(models.Model):
file=models.FileField(upload_to="%(myobject_id)s")
myobject=models.ForeignKey(MyObject)
This
2 matches
Mail list logo