Code

Changes between Version 29 and Version 30 of NewformsHOWTO


Ignore:
Timestamp:
04/03/08 07:39:15 (6 years ago)
Author:
james@…
Comment:

Remvoed question about the model's repr as it doesn't do that anymore

Legend:

Unmodified
Added
Removed
Modified
  • NewformsHOWTO

    v29 v30  
    269269}}} 
    270270 
    271 == Q: Oh. Your. God. What is that ridiculous bit of text on every row of my edit_inline form? == 
    272 A: That's your model's repr, that is. Why is it there? No idea. To get rid of it you'll need to create a copy of the 'admin/edit_inline/(tabular|stacked).html' template and replace the following lines: 
    273 {{{ 
    274 #!python 
    275         <td class="original">{% if inline_admin_form.original or inline_admin_form.show_url %}<p> 
    276           {% if inline_admin_form.original %} {{ inline_admin_form.original }}{% endif %} 
    277           {% if inline_admin_form.show_url %}<a href="/r/{{ inline_admin_form.original.content_type_id }}/{{ inline_admin_form.original.id }}/">View on site</a>{% endif %} 
    278             </p>{% endif %} 
    279 }}} 
    280 with: 
    281 {{{ 
    282 #!python 
    283         <td class="original"> 
    284 }}} 
    285  
    286271== Q: How do I get at the ID of my model in an inline row? == 
    287272A: It's a bit of an effort but the following works for me: