Задать вопрос

Тел: +7 965 3737 888

428

Просмотров

0

Ответов

newforms field callback helper

<p><strong>Now redundant any anything &gt;0.96</strong>, as form_for_* methods now have a fields attribute</p>
<p>formfield_callbacks are a bit difficult to use, here's a helper method to create a callback function to use with the form_for_instance and form_for_model methods.</p>
<p>Example usage:</p>
person_callback = new_callback(exclude=['password', 'can_add_staff', 'is_staff'])
def form_for_person(person):
    return form_for_instance(person, formfield_callback=person_callback)

Вопрос полезен? Да0/Нет0
file_4039.py(388.0б)
None