Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def contact(request):
- form = FlexiForm(ContactForm, kwargs={'prefix': 'something-%s' % (some_id,), 'label_suffix': ': ',})
- if request.method == 'POST':
- form.bind(request.POST) # substitutes internal ContactForm() with ContactForm(request.POST)
- if form.is_valid():
- pass
- else:
- pass # Form already instantiated!
- return render(request, 'contact.html', {
- 'form': form,
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement