Django 中的 Jquery:我应该研究哪些 Django 应用程序?
我想在我的表单中使用一些 jquery,并且希望使用一些现成的解决方案 - 似乎有很多......
您会推荐哪些 django 应用程序用于此目的?哪些最受欢迎?
编辑#1: 嗯...我想我没有对我的问题投入足够的精力...我希望有更多的选项/澄清...
似乎有大量的 jquery 应用程序。这是一个随机选择:
- django-ajax-selects - 用于自动完成ManyToManyFields和ForeignKeys
- django-autocomplete - 与上面相同
- django-ajax-filtered-fields - 再次自动完成
- django-easywidgets - 这个似乎没有在线记录,所以我不确定它的作用,但它可能是一个集合小部件。
- django-ajax-forms - 从我所看到的silent1mezzo已经提到过它进行客户端验证
- django-dynamic-formset - 将新表单添加到已渲染的表单集
- django-form-widgets - datapicker 等小部件的集合 我认为
显而易见的答案是“使用能够为您提供所需功能的产品”,因为其中大多数都有不同的用途。但我想知道哪些是常用的......或者也许大多数人只是倾向于编写自己的代码?
对于对 jquery 一无所知的人来说,使用其中一个或几个更容易?还是“手工”更容易?
I want to use some jquery in my forms and I was hoping to use some ready made solutions - there seem to be a lot of them...
Which django apps would you recommend for this purpose? Which are most popular?
EDIT #1:
Hmmmm... I suppose I didn't put enough effort into my question... I was hoping for more options/clarifications...
There seems to be a huge amount of jquery apps out there. Here's a random selection:
- django-ajax-selects - for autocompleting ManyToManyFields and ForeignKeys
- django-autocomplete - same as above
- django-ajax-filtered-fields - autocomplete yet again
- django-easywidgets - this one doesn't seem to be documented on-line, so I'm not sure what it does, but it's probably a collection of widgets.
- django-ajax-forms - already mentioned by silent1mezzo, from what I can see it does client side validation
- django-dynamic-formset - adding new forms to an already rendered formset
- django-form-widgets - a collection of widgets like datapicker etc.
I suppose the obvious answer is "use the one that gives you the functionality you need", as most of these serve different purposes. But I was wondering which are commonly used... Or maybe most people just tend to code their own?
For someone who is pretty clueless about jquery is it easier to use one or a few of these? Or is it easier to do it "by hand"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是一些
Ajax 联系表单示例 http://www.djangosnippets.org/snippets/992/
django-ajax-forms http://code.google.com/p/django- ajax-forms/
如果您想亲自动手,这里有一个教程
http://dewful.com/?p=100
Here's a few examples
Ajax Contact Form http://www.djangosnippets.org/snippets/992/
django-ajax-forms http://code.google.com/p/django-ajax-forms/
Here's a tutorial if you want to get your hands dirty
http://dewful.com/?p=100