Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. # Some really nice defaults
  2.  
  3. ACCOUNT_ADAPTER = 'allauth.account.adapter.DefaultAccountAdapter'
  4. #ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS = True # By changing this setting to False, logged in users will not be redirected when they access login/signup pages.
  5. ACCOUNT_AUTHENTICATION_METHOD = 'username_email' # User can login with username or email
  6. ACCOUNT_USERNAME_REQUIRED = False # TODO: What about HOS Users??
  7.  
  8. ACCOUNT_CONFIRM_EMAIL_ON_GET = False
  9. ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = LOGIN_URL
  10. ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = '/'
  11. ACCOUNT_EMAIL_CONFIRMATION_COOLDOWN = 180
  12.  
  13. ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 1
  14. # Determines the expiration date of email confirmation mails (# of days).
  15. ACCOUNT_EMAIL_CONFIRMATION_HMAC = True
  16. # In order to verify an email address a key is mailed identifying the email address to be verified. In previous versions, a record was stored in the database for each ongoing email confirmation, keeping track of these keys. Current versions use HMAC based keys that do not require server side state.
  17. ACCOUNT_EMAIL_REQUIRED = True
  18. # Determines the e-mail verification method during signup – choose one of "mandatory", "optional", or "none". When set to “mandatory” the user is blocked from logging in until the email address is verified. Choose “optional” or “none” to allow logins with an unverified e-mail address. In case of “optional”, the e-mail verification mail is still sent, whereas in case of “none” no e-mail verification mails are sent.
  19. ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
  20. # Determines the e-mail verification method during signup – choose one of "mandatory", "optional", or "none". When set to “mandatory” the user is blocked from logging in until the email address is verified. Choose “optional” or “none” to allow logins with an unverified e-mail address. In case of “optional”, the e-mail verification mail is still sent, whereas in case of “none” no e-mail verification mails are sent.
  21. ACCOUNT_EMAIL_SUBJECT_PREFIX =''
  22. # Subject-line prefix to use for email messages sent. By default, the name of the current Site (django.contrib.sites) is used.
  23. ACCOUNT_DEFAULT_HTTP_PROTOCOL ='http'
  24.  
  25. # Security
  26. ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 5
  27. ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 86400
  28.  
  29. ACCOUNT_LOGOUT_ON_GET = False
  30. ACCOUNT_LOGOUT_REDIRECT_URL ='/'
  31. ACCOUNT_SIGNUP_FORM_CLASS = None #Custom Content -> 'users.forms.SignupForm'
  32. ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = True
  33. ACCOUNT_UNIQUE_EMAIL = True
  34. ACCOUNT_USER_MODEL_EMAIL_FIELD ='email'
  35. ACCOUNT_USER_MODEL_USERNAME_FIELD ='username'
  36.  
  37. ACCOUNT_USERNAME_MIN_LENGTH = 5
  38. ACCOUNT_USERNAME_REQUIRED = True
  39. ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True # The default behaviour is not log users in and to redirect them to ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
  40. #By changing this setting to True, users will automatically be logged in once they confirm their email address. Note however that this only works when confirming the email address immediately after signing up, assuming users didn’t close their browser or used some sort of private browsing mode.
  41.  
  42. #ACCOUNT_SIGNUP_EMAIL_ENTER_TWICE = 'True' # Default is false
  43. #ACCOUNT_SESSION_REMEMBER = 'None' # Default is None. Controls the life time of the session. Set to None to ask the user 'Remember me?', False to not remember, and True to always remember.
  44. #ACCOUNT_SIGNUP_FORM_CLASS = 'None' # A string pointing to a custom form class (e.g. ‘myapp.forms.SignupForm’) that is used during signup to ask the user for additional input (e.g. newsletter signup, birth date). This class should implement a def signup(self, request, user) method, where user represents the newly signed up user.
  45. #ACCOUNT_USERNAME_BLACKLIST = []
  46. #ACCOUNT_USERNAME_MIN_LENGTH = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement