Help Django

39 views
Skip to first unread message

Cassiano Monego

unread,
Aug 29, 2014, 1:23:54 PM8/29/14
to django...@googlegroups.com
Good Afternoon Everyone,

I am Working with Django the little time and I'm facing a problem. I need to create a form in the admin module of my project, and this record I have a field called RULE. where I can register a field called RULE, RULE put the field can have 1 or N records. My question is this, how do I create a RULE field where the user can add more fields as necessary RULE?

For example:

Rule:   xxx.xxx.xxx.xxx (add more fields RULE)
           xxx.xxx.xxx.xxx
           xxx.xxx.xxx.xxx
           ...

I count on your help.

Thanks in advance.

Collin Anderson

unread,
Aug 29, 2014, 3:01:36 PM8/29/14
to django...@googlegroups.com
the general way is to have a "rule" model with a foreign key to your main model, then use an inline in the admin
Message has been deleted

Cassiano Monego

unread,
Aug 29, 2014, 3:46:54 PM8/29/14
to django...@googlegroups.com
you have any examples of how to do this procedure?


Collin Anderson

unread,
Aug 29, 2014, 3:49:37 PM8/29/14
to django...@googlegroups.com

Cassiano Monego

unread,
Aug 29, 2014, 4:36:11 PM8/29/14
to django...@googlegroups.com
Thank you Collin.

Em sexta-feira, 29 de agosto de 2014 16h49min37s UTC-3, Collin Anderson escreveu:
Reply all
Reply to author
Forward
0 new messages