You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
489 B
13 lines
489 B
from django.contrib.auth.forms import forms
|
|
from django.forms import widgets
|
|
|
|
|
|
class RequireEmailForm(forms.Form):
|
|
email = forms.EmailField(label='电子邮箱', required=True)
|
|
oauthid = forms.IntegerField(widget=forms.HiddenInput, required=False)
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super(RequireEmailForm, self).__init__(*args, **kwargs)
|
|
self.fields['email'].widget = widgets.EmailInput(
|
|
attrs={'placeholder': "email", "class": "form-control"})
|