Monday, August 5, 2013

Best way to make a view for a simple post-comment page?

Beginner here looking for advice as to the simplest, best-practicey way to do this.

Right now I'm just piping a generic, class-based DetailView to a template that displays an instance of a "Post" model and all of its ForeignKey "Comment" model instances.

I'd like to keep things as simple, even generic as possible (seems like CBVs are good for this?), as the only additional functionality I need is the ability to create and delete comments. I'm looking to have a simple form (just a textarea) beneath the original post, as well as beneath each comment (all these forms will at some point be hidden behind a link by default using Javascript).

I've been trying to figure out the best way to do this, but there seem to be multiple possible ways, and it's hard to determine which would be best. Nudges in the right direction appreciated.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment