Hi, I have got a similar or maybe the same problem.
I have customized my admin form for a specific model. My model has got
Inline elements that are shown on the admin form, but the template for
this is completely customized. This is how I print the (product)
model:
<div class="product_wrapper" style="display:inline;">
{{ fieldset.form.product.errors }}
{{ fieldset.form.product.label_tag }}: {{ fieldset.form.product }}
</div>
Now my inline model admin code looks like this:
class CommonInvoiceItemInline(admin.StackedInline):
from voipgo.service_products.models import Item
extra = 1
model = Item
form = SpecialItemForm
formset = BaseItemFormSet
template = 'admin/accounting/commoninvoice/commoninvoice_inline.html'
If I comment out my custom template, then the plus sign is rendered
and working correctly on the default Inline form display. When I use
my own template it's gone. So how can I bring it back there?
Thanks, Dennis
On Feb 16, 2:18 pm, Matt Schinckel <[email protected]> wrote:
> On Feb 14, 3:49 pm, john <[email protected]> wrote:
>
>
>
> > Yes, the Items model data can be accessed through another part of the
> > Admin interface, but I think the purpose of the Green Plus Sign was to
> > alleviate this extra step.
>
> Try registering the model of that type with the admin. The green plus
> will only appear if the model is registered - otherwise it is unable
> to find a change_form to allow for adding/editing the initial values.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.