Opened 15 years ago

Last modified 11 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, 15 years ago

Milestone: 0.0.3

comment:1 by Christopher Allan Webber, 15 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, 15 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:4 by Christopher Allan Webber, 15 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, 15 years ago

Feature branch located at [https://gitorious.org/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, 15 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, 15 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, 15 years ago

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

[https://gitorious.org/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, 15 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, 14 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.