Mike,

I find it very limiting that by default comments can be made on
database objects only. Another limitation that I hit is that I can't
comment on comment. It is failing at least for me. I will probably
implement whole comments myself.

Thanks again,

Tomas

On Oct 6, 5:43 pm, kmike <kmik...@googlemail.com> wrote:
> It seems thatdjango'scommentssystem isn't exactly what your want.
> It is quity easy to write your specialisedcommentsapp, one solution
> is to just write your own.
>
> Second solution solution is:
>
> 1. Attachcommentsto your page model, not paragraph.
> 2. Add paragraph_id field to comment model.
> 3. Customizecommentsform to include (hidden?) paragraph_id field
> 4. Use {% regroup %} template tag in templates for comment rendering.
> 5. Write your own render_comment_form template tag which accepts
> additional paragraph_id parameter and constructs form taking this
> parameter in account. If it's not sufficient, write your versions of
> necessery template tags (or just don't use them, theay are not
> required forcommentsapp to work).
>
> On 6 окт, 00:38, cirip <cir...@gmail.com> wrote:
>
> > Mike,
>
> > Thanks. Well I understand that I can add extra field. That's not my
> > problem. My problem is that I want to be able to add comment without
> > having to create an instance of the object thatcommentsrefers to.
> > For example for render the form I shall use:
>
> > {% get_comment_count for config.commenttarget 'paragraph_14' as
> > comment_count %}
>
> > Model config.commenttarget exists, but there is no data in that table.
> > However, I can readcommentsand get count etc.
>
> > When it comes to rendering entry form
>
> > {% render_comment_form for paragraph %}
>
> > I need to create paragraph object to render the form. I don't wan to
> > create paragraph object in the database for each paragraph that I want
> > to comment on. I mean I could try to create object paragraph and never
> > persist it and it all might magically work.
>
> > All I want iscommentswithout any referential integrity with just one
> > extra field - paragraph id that I could use to querycommentsfor that
> > particular paragraph.
>
> > Thanks again,
>
> > Tomas
>
> > On Oct 3, 11:28 am, kmike <kmik...@googlemail.com> wrote:
>
> > > If you want additional field (paragraph_id) in Comment model you can
> > > create your own model as decribed here:
>
> > >http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/#ref...
>
> > > On 3 окт, 01:46, cirip <cir...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > I am just reading aboutdjangocommentsframework that I planned to
> > > > use.
>
> > > > As I learned so far you have to have object to whichcommentsbelong
> > > > in the database as well. Let's say I just want to havecomments
> > > > related to some paragraph on my page without having to create record
> > > > for each paragraph that I want to comment on and I would like to use
> > > > paragraph id as the key to identify thecomments.
>
> > > > Thanks,
>
> > > > Tomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to