Skip to content

Instantly share code, notes, and snippets.

@esseti

esseti/views.py Secret

Last active April 3, 2018 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esseti/37d17a668ab0f87b6f51986d76d8d854 to your computer and use it in GitHub Desktop.
Save esseti/37d17a668ab0f87b6f51986d76d8d854 to your computer and use it in GitHub Desktop.
class MyVIew(CreateView):
template_name = "my_template.html"
form_class = MultipleChoiceForm
def get_form_kwargs(self):
ctx = super().get_form_kwargs()
ctx.update({'qs':THE_QUERYSET})
return ctx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment