On Dec 27, 8:22 am, Muchanic <[EMAIL PROTECTED]> wrote:
> Just FYI and for anyone else who comes across this thread - I had the
> same problem, trying to pass a ForeignKey via HiddenInput in an app
> I'm working on. If you need to/want to do it this way, the trick is
> that you have to use a Mode
Just FYI and for anyone else who comes across this thread - I had the
same problem, trying to pass a ForeignKey via HiddenInput in an app
I'm working on. If you need to/want to do it this way, the trick is
that you have to use a ModelChoiceField and not an IntegerField for
Django to be able to do
Thank you, I will check that. I wasn't aware of that possibility.
--~--~-~--~~~---~--~~
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
i think you should look at using threadlocals to access users outside
the request instead of sending the user id in a hidden field.
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
quite straightforward
On Dec 24, 2:10 am, l5x <[EMAIL PROTECTED]> wrote:
> class Photo(models.Model):
class Photo(models.Model):
user = models.ForeignKey(User)
main = models.BooleanField(_('Is main?'))
icon = models.ImageField(_('Icon'), upload_to='photo', null=True,
blank=True,
help_text=_('Don\'t touch! It will be
generated automatically'))
medium = m
5 matches
Mail list logo