All auth form with extra fields added, setings tweaked
This commit is contained in:
parent
edc6f63cd9
commit
bb89200e8b
|
@ -35,6 +35,16 @@ class ConnectionsWidget(forms.SelectMultiple):
|
||||||
#ctx['data_json'] = json.dumps(selected_values) # json.dumps(choices)
|
#ctx['data_json'] = json.dumps(selected_values) # json.dumps(choices)
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
|
class ItfAllAuthRegForm(forms.Form):
|
||||||
|
firstname=forms.CharField()
|
||||||
|
lastname=forms.CharField()
|
||||||
|
|
||||||
|
def save(self, user):
|
||||||
|
first_name = self.cleaned_data['firstname']
|
||||||
|
last_name = self.cleaned_data['lastname']
|
||||||
|
p = Person(user=user, first_name=first_name, last_name=last_name)
|
||||||
|
p.save()
|
||||||
|
return self
|
||||||
|
|
||||||
class ItfRegistrationForm(RegistrationForm):
|
class ItfRegistrationForm(RegistrationForm):
|
||||||
subscribe = forms.BooleanField(help_text='Subscribe to newsletter?')
|
subscribe = forms.BooleanField(help_text='Subscribe to newsletter?')
|
||||||
|
|
|
@ -228,28 +228,36 @@ INSTALLED_APPS = (
|
||||||
'emailconfirmation',
|
'emailconfirmation',
|
||||||
)
|
)
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = '/'
|
LOGIN_REDIRECT_URL = '/itf_profile'
|
||||||
#ACCOUNT_AUTHENTICATION_METHOD=''
|
#ACCOUNT_AUTHENTICATION_METHOD=''
|
||||||
|
|
||||||
#ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
|
#ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
|
||||||
ACCOUNT_EMAIL_REQUIRED=False
|
ACCOUNT_EMAIL_REQUIRED=True
|
||||||
ACCOUNT_EMAIL_VERIFICATION=False
|
ACCOUNT_EMAIL_VERIFICATION=False
|
||||||
ACCOUNT_EMAIL_SUBJECT_PREFIX="[ITF]"
|
ACCOUNT_EMAIL_SUBJECT_PREFIX="[ITF]"
|
||||||
ACCOUNT_SIGNUP_PASSWORD_VERIFICATION=True
|
ACCOUNT_SIGNUP_PASSWORD_VERIFICATION=True
|
||||||
|
ACCOUNT_SIGNUP_FORM_CLASS='itfprofiles.forms.ItfAllAuthRegForm'
|
||||||
ACCOUNT_UNIQUE_EMAIL=False
|
ACCOUNT_UNIQUE_EMAIL=False
|
||||||
ACCOUNT_PASSWORD_MIN_LENGTH=6
|
# TODO ACCOUNT_USER_DISPLAY (=a callable returning user.username)
|
||||||
|
ACCOUNT_PASSWORD_MIN_LENGTH=4
|
||||||
SOCIALACCOUNT_AVATAR_SUPPORT='avatar'
|
SOCIALACCOUNT_AVATAR_SUPPORT='avatar'
|
||||||
|
#SOCIALACCOUNT_QUERY_EMAIL=True
|
||||||
EMAIL_CONFIRMATION_DAYS=3
|
EMAIL_CONFIRMATION_DAYS=3
|
||||||
|
# check if the below setting allows confirmation of username retrieved from social site
|
||||||
|
SOCIALACCOUNT_AUTO_SIGNUP=False
|
||||||
|
|
||||||
#EMAIL_HOST ='smtp.gmail.com'
|
# Nice to have but needs checking
|
||||||
#EMAIL_HOST_USER = 'subhodipbiswas@gmail.com'
|
#SOCIALACCOUNT_PROVIDERS (= dict)
|
||||||
#EMAIL_HOST_PASSWORD ='doaxhentai'
|
SOCIALACCOUNT_PROVIDERS = { 'openid':
|
||||||
#EMAIL_PORT =587
|
{ 'SERVERS':
|
||||||
#EMAIL_USE_TLS =True
|
[dict(id='yahoo',
|
||||||
#SERVER_EMAIL = EMAIL_HOST_USER
|
name='Yahoo',
|
||||||
#DEFAULT_FROM_EMAIL=EMAIL_HOST_USER
|
openid_url='http://me.yahoo.com'),
|
||||||
|
dict(id='google',
|
||||||
|
name='Google',
|
||||||
|
openid_url='https://www.google.com/accounts/o8/id')]}}
|
||||||
|
|
||||||
ACCOUNT_ACTIVATION_DAYS = 30
|
#ACCOUNT_ACTIVATION_DAYS = 30
|
||||||
|
|
||||||
#overwrite default settings with local settings
|
#overwrite default settings with local settings
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user