简体   繁体   English

Django Admin中的Javascript验证

[英]Javascript Validation in Django Admin

I'd like to use Javascript to validate forms in the Django admin interface. 我想使用Javascript来验证Django管理界面中的表单。 I was going to use this jQuery plugin , but I wanted to make sure that there wasn't some other Django conventional way to do it. 我打算使用这个jQuery插件 ,但我想确保没有其他Django常规方法来实现它。 I looked around a bit and didn't see anything, but I wanted to be sure I wasn't missing something. 我环顾四周,没有看到任何东西,但我想确定我没有遗漏一些东西。

Here is the list of javascripts Django admin loads by default on change_form.html template: 以下是Django管理员在change_form.html模板上默认加载的javascripts列表:

core.js
admin/RelatedObjectLookups.js
js/jquery.min.js
js/jquery.init.js
js/actions.min.js

None of these seems to contain client side validation code. 这些似乎都不包含客户端验证代码。 So, you can use it safely. 所以,你可以安全地使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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