daily pastebin goal
50%
SHARE
TWEET

Untitled

a guest Feb 14th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django import forms
  2. from django.utils.translation import ugettext_lazy as _
  3. from .models import User
  4.  
  5.  
  6. class UserForm(forms.ModelForm):
  7.     name = forms.CharField(required=False, label=_('Name of User'))
  8.     userpic = forms.ImageField(required=False, label=_('Picture of User'))
  9.     date_of_birth = forms.DateField(required=False, label=_('Birth date of User'))
  10.     info = forms.TextInput()
  11.  
  12.     class Meta:
  13.         model = User
  14.         fields = ('name', 'userpic', 'date_of_birth', 'info', )
RAW Paste Data
Top