django-bootstrap-forms

Software screenshot:
django-bootstrap-forms
Dettagli del software:
Versione: 0.1
Data di caricamento: 20 Feb 15
Sviluppatore: Earle Ady
Licenza: Libero
Popolarità: 13

Rating: 2.5/5 (Total Votes: 2)

django-bootstrap-forme è un app Django che fornisce Twitter bootstrap forme Django pronti.
Installazione
1. Installare utilizzando pip:
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; pip installare git -e + git: //github.com/earle/django-bootstrap.git#egg=bootstrap
2. Aggiungere a INSTALLED_APPS:
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; 'Bootstrap',
Utilizzo
& Nbsp; & nbsp; & nbsp; da bootstrap.forms importare BootstrapForm, Fieldset
& Nbsp; & nbsp; & nbsp; LoginForm class (BootstrapForm):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; Classe Meta:
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; layout = (
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; Fieldset ("Effettua il Login", "username", "password",),
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; )
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; username = forms.CharField (max_length = 100)
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; password = forms.CharField (widget di = forms.PasswordInput (), max_length = 100)
Se si desidera utilizzare il modulo involucro Bootstrap su un built-in forma, come quelle in `django.contrib.auth.forms` quindi è possibile utilizzare la classe intermedia.
& Nbsp; & nbsp; & nbsp; da django.contrib.auth.forms import PasswordChangeForm
& Nbsp; & nbsp; & nbsp; da bootstrap.forms importare BootstrapMixin, Fieldset
& Nbsp; & nbsp; & nbsp; Classe BootstrapPasswordChangeForm (BootstrapMixin, PasswordChangeForm):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; Classe Meta:
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; layout = (
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; Fieldset ("Cambia la tua password",
                        "Old_password", "new_password1", "new_password2"),
Quando si utilizza il mixin direttamente deve essere la prima della classe il modulo eredita da.
Template Uso
& Nbsp; & nbsp; & nbsp;


& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; {{Forma}}
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;

& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; Login
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;

& Nbsp; & nbsp; & nbsp;

Requisiti :

  • Python
  • Django

Commenti a django-bootstrap-forms

I commenti non trovato
Aggiungi commento
Accendere le immagini!