Opened 13 years ago

Last modified 9 years ago

#77 closed defect (FIXED)

Comments (simple)

Reported by: Christopher Allan Webber Owned by: joar
Priority: minor Milestone: 0.0.3
Component: programming Keywords:
Cc: Parent Tickets:

Description

Comments to MediaEntry objects should be possible

I think we don't need to do complicated threading for now. Just
comments which are paginated. Restricting to users registered on
that site for now is good enough. We'll want more than that
eventually, but for now it's okay.


-  Just simple flat comments, no threading (yet)
-  Just comments by logged in, active users
-  pagination of comments! Sorted by comment time, obviously.
-  Don't embed the comments, make the comments link back to the
   MediaEntries via their ObjectIds

That's it :)



Change History (11)

comment:1 by Christopher Allan Webber, 13 years ago

Milestone: 0.0.3

comment:1 by Christopher Allan Webber, 13 years ago

Also, comments should be formattable via markdown. However instead
of rendering to html in the templates (which would be unnecessarily
costly) we might as well render the body in the comment submission
view like:

::

    >>> comment['body'] = 'I am *soooo* hungry!'
    >>> comment.render_body()
    >>> comment['body_rendered']
    u'<p>I am <em>soooo</em> hungry!</p>'
    >>> comment.save()



comment:2 by Christopher Allan Webber, 13 years ago

Don't forget to escape:

safe\_mode="escape"

::

    [http://www.freewisdom.org/projects/python-markdown/Using_as_a_Module](http://www.freewisdom.org/projects/python-markdown/Using_as_a_Module)



comment:3 by joar, 13 years ago

Regarding markdown:

`http://bugs.foocorp.net/issues/363#note-4 <http://bugs.foocorp.net/issues/363#note-4>`_



comment:4 by Christopher Allan Webber, 13 years ago

Rumor is that Joar has done a small amount of work on this ;)

(Lies, Joar has done a lot of work!)

Joar, what's the status? Is there anything you think is missing
presently, aside maybe from tests and indexing?



comment:5 by joar, 13 years ago

Feature branch located at
[https://gitorious.org/\ :sub:`jwandborg/mediagoblin/jwandborgs-mediagoblin/commits/feature\_362-simple\_comments](https://gitorious.org/`\ jwandborg/mediagoblin/jwandborgs-mediagoblin/commits/feature\_362-simple\_comments),
awaiting feedback.



comment:6 by joar, 13 years ago

Status: NewIn Progress
Changing % done, the remaining 20% is for feedback and necessary
changes that emerges from said feedback.



comment:7 by Christopher Allan Webber, 13 years ago

Merged! I'm willing to bypass tests before closing this ticket
because we lack a good fixtures setup, but we do need to add
indexing. I'll do that now.



comment:8 by joar, 13 years ago

I've made even more changes, cleaning up the code structure as
suggested by you and Elrond.

[https://gitorious.org/\ :sub:`jwandborg/mediagoblin/jwandborgs-mediagoblin/commits/feature\_362-simple\_comments-acts\_on\_feedback](https://gitorious.org/`\ jwandborg/mediagoblin/jwandborgs-mediagoblin/commits/feature\_362-simple\_comments-acts\_on\_feedback)



comment:9 by Christopher Allan Webber, 13 years ago

Status: In ProgressClosed
Closed! Merged your latest changes, and actually I pushed the
indexing a bit ago...



comment:10 by Will Kahn-Greene, 12 years ago

The original url for this bug was http://bugs.foocorp.net/issues/362 .
Relations:
#337: related

Note: See TracTickets for help on using tickets.