Skip to content

Instantly share code, notes, and snippets.

@graingert
Created February 15, 2012 22:44
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 graingert/1839730 to your computer and use it in GitHub Desktop.
Save graingert/1839730 to your computer and use it in GitHub Desktop.
class ReviewForm(f.ModelForm):
class Meta:
model = Review
class CommentCreateView(CreateView):
model = Comment
form_class = CommentForm
@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
return super(CommentCreateView, self).dispatch(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment