Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#16579 closed New feature (invalid)

An issue of migrate comments to databrowse.

Reported by: leopku <…> 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


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 Changed 8 years ago by Aymeric Augustin

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 Changed 8 years ago by leopku <…>

Great, object.instance works!

Thanks a lot.

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