Created
May 28, 2013 12:26
-
-
Save JuniorLima/5662391 to your computer and use it in GitHub Desktop.
Ordenação de campos no forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ManifestacoesForm(forms.ModelForm): | |
class Meta: | |
model = Manifestacoes | |
exclude = ['codigo', 'ano', 'transferido', 'arquivado', 'ala', 'estante', 'prateleira', 'caixa', 'cancelamento', 'motivo_cancelamento'] | |
def __init__(self, *args, **kwargs): | |
super(ManifestacoesForm, self).__init__(*args, **kwargs) | |
self.fields.keyOrder = ['name', 'summary', 'description'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment