Re: Post and Comment with the same Model.

2010-05-25 Thread Scott Gould
>From your description thus far I'd probably try to use django.contrib.comments and be done with it. Build the specific models you need for your app, but don't reinvent the wheel when there's a perfectly good generic commenting app out there already. On May 25, 12:01 pm, nameless wrote: > mmm so

Re: Post and Comment with the same Model.

2010-05-25 Thread nameless
mmm so I could use Post model with a foreign key to blog and a Comment model with a generic foreign key ( because I could comment post, images, videos, ecc ). Is this a wrong ? What is the better solution in your opinion ? Thanks ^_^ - On 25 Mag, 13:32, Tom Evans wrote: > On Tue, May 25

Re: Post and Comment with the same Model.

2010-05-25 Thread Tom Evans
On Tue, May 25, 2010 at 12:20 PM, nameless wrote: > Generic field because on my project you can post and comment in Blogs, > Gallery pages, Foto pages, video pages, ecc. > So I want to use my Post_comment models for post and comment > anythings. > Is this a wrong solution ? > Are there problems wi

Re: Post and Comment with the same Model.

2010-05-25 Thread nameless
Generic field because on my project you can post and comment in Blogs, Gallery pages, Foto pages, video pages, ecc. So I want to use my Post_comment models for post and comment anythings. Is this a wrong solution ? Are there problems with the performances ? Thanks ;) On 25 Mag, 12:19, Sc

Re: Post and Comment with the same Model.

2010-05-25 Thread Scott Gould
Presumably you want the same object to be able to be a comment on someone else's post as well as a post in it's own right, that others could comment on? Looks straightforward enough, though I can't see why you'd need the generic fields in the model. Regards Scott On May 25, 5:54 am, nameless wro

Post and Comment with the same Model.

2010-05-25 Thread nameless
I have created a simple project where everyone can create one or more Blog. I want to use this models for Post and for Comment: class Post_comment(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField(_('object ID')) content_object = gen