B
B
Boldy2015-02-21 09:04:24
Django
Boldy, 2015-02-21 09:04:24

How to automatically populate inline in django admin?

Available online:

class PaymentInline(admin.TabularInline):
    model = Payment
    extra = 12

You need to make sure that the value "total" is 5000 in the first inline, and 4000 in all the rest, as well as fill the date field with the first days of the month starting from today (in February from March 1, etc.)
How to implement this ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Guest007, 2015-02-21
@Boldy

Well, there is an answer here: stackoverflow.com/questions/442040/pre-populate-an...
Should help...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question