Defining Default Inline value for Django Admin forms? -


if have inline admin class this:

class resourceinline(admin.tabularinline):     model = resource     = 3 

is there way specify default values 3 "extra" resources because manual says prepopulated_fields doesn't accept foreignkey fields.

you override formfield_for_foreignkey , set initial value of fields.

check answer basic idea: default value user foreignkey django admin


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -