I have a model like this:

class Website(models.Model):
    user = models.ForeignKey(User)
    name = models.CharField(unique=True, max_length=32)

And use a generic view to create new items:

def website_create(request):
    return create_update.create_object(
        request = request,
        form_class = WebsiteCreateForm)

This works except i want to prefill (and hide) the user field. Hiding
is no problem with crispy forms, but how do i prefill the user field
based on request.user?

The generic view doesn't except any initial data or pre-validate
callables.

Any help is greatly appreciated!

Paul

-- 
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.

Reply via email to