简体   繁体   中英

django inline form validation

For the Django Admin site, I write a custom form for a particular table, as say it named book.

I also write the validation method for book form and it works just fine. Then I create the inline form of Books for Author.

Now my validations for Book form doesn't get call on inline form validation. I have to write them again in a inline formset clean function. I know it is accpetable, but I don't want to repeat.

So is there any way to apply my form validation on inline formset?

Thanks in advance

如果您不想重复,请使用mixin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM