after some debugging i find that i had a bug in filebrowser app. the
code from above is ok and self.photo_set is something that i forget to
remove before posting. but can you tell me how should i convert to
unicode?
self.slug = unicode(self.photo_set)+unicode(self.photo_item)
is this ok?
On Jul
On Jul 17, 4:08 pm, onoxo wrote:
> how can i access ForeignKey model attribute value in save() or
> __unicode__ method?
> some hint will help.
>
> here is my model.py:
>
> class PhotoSetPhotoItem(models.Model):
> photo_item = models.ForeignKey('Photo', related_name='photoitem')
> slug = m
does someone have a hint on this one?
On Jul 17, 5:08 pm, onoxo wrote:
> how can i access ForeignKey model attribute value in save() or
> __unicode__ method?
> some hint will help.
>
> here is my model.py:
>
> class PhotoSetPhotoItem(models.Model):
> photo_item = models.ForeignKey('Photo', r
how can i access ForeignKey model attribute value in save() or
__unicode__ method?
some hint will help.
here is my model.py:
class PhotoSetPhotoItem(models.Model):
photo_item = models.ForeignKey('Photo', related_name='photoitem')
slug = models.SlugField(blank = True, null = True)
de
4 matches
Mail list logo