Skip to content

Instantly share code, notes, and snippets.

@flavianmissi
Created October 9, 2011 20:41
Show Gist options
  • Save flavianmissi/1274140 to your computer and use it in GitHub Desktop.
Save flavianmissi/1274140 to your computer and use it in GitHub Desktop.
Django CreateView sample
from django.views.generic import CreateView
from library.forms import BookForm
class CreateBook(CreateView):
template_name = 'create_form.html'
success_url = '/books/'
form_class = BookForm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment