Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16579 closed New feature (invalid)

An issue of migrate comments to databrowse.

Reported by: leopku <leo.ss.pku@…> Owned by: nobody
Component: contrib.databrowse Version: 1.3
Severity: Normal Keywords: databrowse, comments
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Steps to reproduce bugs.

  1. install databrowse and comments app.
  1. add models in your app.
  1. view the instance of your models using databrowse.
  1. copy object_detail.html template from databrowse template dir to {your_project_dir}/templates/databrowse/
  1. add a line after "</table>" in {your_project_dir}/templates/databrowse/object_detail.html

{% render_comment_list for object %}

  1. refresh databrowse detail page of one instance. A TemplateSyntaxError was throw out.

Caught AttributeError while rendering: 'EasyInstance' object has no attribute '_meta'

Change History (2)

comment:1 by Aymeric Augustin, 13 years ago

Resolution: invalid
Status: newclosed

Indeed, this happens because databrowse hands a wrapper (EasyInstance) to the view, not the original object. Try this: {% render_comment_list for object.instance %}.

I'm not sure if this qualifies as a bug: databrowse's documentation doesn't describe the templates, and databrowse is intended as a plug'n'play tool, not as a basis for further development. Also, I don't know how we could "fix" this: EasyInstance is really a core component of databrowse.

For these reasons, I'm marking this ticket as invalid. However, if you have an idea to improve Django with regard to this problem, please reopen the ticket and describe it.

comment:2 by leopku <leo.ss.pku@…>, 13 years ago

Great, object.instance works!

Thanks a lot.

Note: See TracTickets for help on using tickets.
Back to Top