#16579 closed New feature (invalid)
An issue of migrate comments to databrowse.
Reported by: | 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.
- install databrowse and comments app.
- add models in your app.
- view the instance of your models using databrowse.
- copy object_detail.html template from databrowse template dir to {your_project_dir}/templates/databrowse/
- add a line after "</table>" in {your_project_dir}/templates/databrowse/object_detail.html
{% render_comment_list for object %}
- refresh databrowse detail page of one instance. A TemplateSyntaxError was throw out.
Caught AttributeError while rendering: 'EasyInstance' object has no attribute '_meta'
Note:
See TracTickets
for help on using tickets.
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.