开发者

Dynamically expanding Django forms

开发者 https://www.devze.com 2022-12-22 18:21 出处:网络
I would like to create a form where a user can enter an arbitrary # of i开发者_如何学Pythontems in separate textboxes. The user could add (and potentially remove) fields as needed. Something like this

I would like to create a form where a user can enter an arbitrary # of i开发者_如何学Pythontems in separate textboxes. The user could add (and potentially remove) fields as needed. Something like this:

Dynamically expanding Django forms

(source: eggdrop.ch)

I found the following different solutions:

http://www.eggdrop.ch/blog/2007/02/15/django-dynamicforms/

http://dewful.com/?p=100

These methods both appear a bit involved. Is there a simpler way?


I know this is a new feature in the admin in Django 1.2.

Maybe you can take a look at the way they implemented it there.

0

精彩评论

暂无评论...
验证码 换一张
取 消