Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How Can I include a field for a Generic Relation in an unbound form?
- ...
- foo = generic.GenericRelation(bar)
- ...
- class myForm(ModelForm):
- class Meta:
- model = foo
- def foo_new(request):
- if request.method == 'POST':
- form = myForm(request.POST)
- if form.is_valid()
- blah blah save
- else:
- form = myForm()
Add Comment
Please, Sign In to add comment