All Auth setup + FB acc. config
This commit is contained in:
parent
93bab11ff7
commit
afe55fce46
|
@ -112,14 +112,23 @@ MEDIA_ROOT = join(PROJECT_PATH, 'static')
|
|||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
"django.core.context_processors.auth",
|
||||
"django.contrib.auth.context_processors.auth",
|
||||
"django.core.context_processors.debug",
|
||||
"django.core.context_processors.i18n",
|
||||
"django.core.context_processors.media",
|
||||
"django.core.context_processors.request",
|
||||
|
||||
# "multilingual.context_processors.multilingual",
|
||||
"frontpage.context_processors.menus"
|
||||
"frontpage.context_processors.menus",
|
||||
"allauth.account.context_processors.account",
|
||||
"allauth.socialaccount.context_processors.socialaccount"
|
||||
)
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
"allauth.account.auth_backends.AuthenticationBackend", )
|
||||
|
||||
AVATAR_STORAGE_DIR = 'uploads/avatars'
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
# trailing slash if there is a path component (optional in other cases).
|
||||
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
||||
|
@ -160,6 +169,7 @@ ROOT_URLCONF = 'urls'
|
|||
|
||||
TEMPLATE_DIRS = (
|
||||
join(PROJECT_PATH, 'templates'),
|
||||
join(PROJECT_PATH, 'templates', 'allauth'),
|
||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
|
@ -204,8 +214,31 @@ INSTALLED_APPS = (
|
|||
'fccv',
|
||||
'haystack',
|
||||
'markitup',
|
||||
'emailconfirmation',
|
||||
# 'avatar',
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'allauth.socialaccount.providers.twitter',
|
||||
'allauth.socialaccount.providers.linkedin',
|
||||
'allauth.socialaccount.providers.openid',
|
||||
'allauth.socialaccount.providers.facebook',
|
||||
'allauth.socialaccount.providers.github'
|
||||
)
|
||||
|
||||
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
ACCOUNT_EMAIL_REQUIRED = True
|
||||
|
||||
|
||||
EMAIL_HOST ='smtp.gmail.com'
|
||||
EMAIL_HOST_USER = 'subhodipbiswas@gmail.com'
|
||||
EMAIL_HOST_PASSWORD ='doaxhentai'
|
||||
EMAIL_PORT =587
|
||||
EMAIL_USE_TLS =True
|
||||
SERVER_EMAIL = EMAIL_HOST_USER
|
||||
DEFAULT_FROM_EMAIL=EMAIL_HOST_USER
|
||||
|
||||
ACCOUNT_ACTIVATION_DAYS = 30
|
||||
|
||||
#overwrite default settings with local settings
|
||||
|
|
|
@ -33,7 +33,9 @@ urlpatterns = patterns('',
|
|||
# (r'site.json', 'app.views.site_json'),
|
||||
(r'^itf/(?P<old_url>.*)', 'festival.views.redirect'),
|
||||
# (r'^accounts/register/', 'registration.views.register', {'form_class': ItfRegistrationForm }),
|
||||
(r'^accounts/', include('registration.urls')),
|
||||
# registration accounts disabled for allauth
|
||||
#(r'^accounts/', include('registration.urls')),
|
||||
(r'^accounts/', include('allauth.urls')),
|
||||
(r'^admin/', include(admin.site.urls)),
|
||||
# ('^getLanguages', 'itfcore.views.getLanguages'),
|
||||
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
||||
|
|
|
@ -20,3 +20,6 @@ django-crispy-forms
|
|||
django-floppyforms
|
||||
django-markitup
|
||||
twitter
|
||||
-e git+git://github.com/pennersr/django-allauth.git#egg=django-allauth
|
||||
-e git+git://github.com/pythonforfacebook/facebook-sdk.git#egg=facebook-sdk
|
||||
django-avatar
|
||||
|
|
|
@ -16,7 +16,7 @@ sys.path.append(root_dir)
|
|||
sys.path.insert(0, os.path.join(root_dir, project_module))
|
||||
|
||||
#reload if this django.wsgi gets touched
|
||||
from oxdjango import monitor
|
||||
from ox.django import monitor
|
||||
monitor.start(interval=1.0)
|
||||
|
||||
monitor.track(os.path.abspath(os.path.dirname(__file__)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user