Created
October 9, 2011 20:41
-
-
Save flavianmissi/1274140 to your computer and use it in GitHub Desktop.
Django CreateView sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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