From 5c9eb1bbe46de2682d8163ca6ff3f3e381eb66d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Jul 2012 15:23:16 +0200 Subject: [PATCH] twitter with avatar images tested for allauth --- itf/settings.py | 38 ++++++++++++------- itf/templates/allauth/account/base.html | 16 ++++++++ itf/templates/allauth/account/email.html | 2 +- itf/templates/allauth/account/login.html | 2 +- itf/templates/allauth/account/logout.html | 2 +- .../allauth/account/password_change.html | 2 +- .../allauth/account/password_delete.html | 2 +- .../allauth/account/password_delete_done.html | 2 +- .../allauth/account/password_reset.html | 2 +- .../allauth/account/password_reset_done.html | 2 +- .../account/password_reset_from_key.html | 2 +- .../allauth/account/password_set.html | 2 +- itf/templates/allauth/account/signup.html | 2 +- .../allauth/account/verification_sent.html | 2 +- 14 files changed, 52 insertions(+), 26 deletions(-) diff --git a/itf/settings.py b/itf/settings.py index ddd6b80..afa0ebc 100755 --- a/itf/settings.py +++ b/itf/settings.py @@ -84,7 +84,7 @@ ERANG_SUBSCRIBE_URL = "http://a.organisedmail.com/nok.x?s=dGhlYXRyZWZvcnVt&ctid= # although not all choices may be available on all operating systems. # If running in a Windows environment this must be set to the same as your # system time zone. -TIME_ZONE = 'America/Chicago' +TIME_ZONE = 'Asia/Kolkata' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html @@ -117,7 +117,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.i18n", "django.core.context_processors.media", "django.core.context_processors.request", - + 'django.contrib.messages.context_processors.messages', # "multilingual.context_processors.multilingual", "frontpage.context_processors.menus", "allauth.account.context_processors.account", @@ -158,6 +158,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', # 'multilingual.middleware.DefaultLanguageMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', # 'djangologging.middleware.LoggingMiddleware', ) @@ -183,6 +184,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.comments', 'django.contrib.markup', + 'django.contrib.messages', 'registration', # 'itfcore', 'festival', @@ -214,8 +216,7 @@ INSTALLED_APPS = ( 'fccv', 'haystack', 'markitup', - 'emailconfirmation', -# 'avatar', + 'avatar', 'allauth', 'allauth.account', 'allauth.socialaccount', @@ -223,21 +224,30 @@ INSTALLED_APPS = ( 'allauth.socialaccount.providers.linkedin', 'allauth.socialaccount.providers.openid', 'allauth.socialaccount.providers.facebook', - 'allauth.socialaccount.providers.github' + 'allauth.socialaccount.providers.github', + 'emailconfirmation', ) - LOGIN_REDIRECT_URL = '/' -ACCOUNT_EMAIL_REQUIRED = True +#ACCOUNT_AUTHENTICATION_METHOD='' +#ACCOUNT_AUTHENTICATION_METHOD = 'username_email' +ACCOUNT_EMAIL_REQUIRED=False +ACCOUNT_EMAIL_VERIFICATION=False +ACCOUNT_EMAIL_SUBJECT_PREFIX="[ITF]" +ACCOUNT_SIGNUP_PASSWORD_VERIFICATION=True +ACCOUNT_UNIQUE_EMAIL=False +ACCOUNT_PASSWORD_MIN_LENGTH=6 +SOCIALACCOUNT_AVATAR_SUPPORT='avatar' +EMAIL_CONFIRMATION_DAYS=3 -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 +#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 diff --git a/itf/templates/allauth/account/base.html b/itf/templates/allauth/account/base.html index 1fd646d..0dd0e07 100644 --- a/itf/templates/allauth/account/base.html +++ b/itf/templates/allauth/account/base.html @@ -1,3 +1,19 @@ {% extends "noel/base.html" %} +{% block extra_head %} + + + +{% endblock %} + {% block content %} +
+ +
+ {% block modal_content %} + {% endblock %} + +
+
+ + {% endblock %} diff --git a/itf/templates/allauth/account/email.html b/itf/templates/allauth/account/email.html index 5163394..eeeb94e 100644 --- a/itf/templates/allauth/account/email.html +++ b/itf/templates/allauth/account/email.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Account" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "E-mail Addresses" %}

{% if user.emailaddress_set.all %}

{% trans 'The following e-mail addresses are associated to your account:' %}

diff --git a/itf/templates/allauth/account/login.html b/itf/templates/allauth/account/login.html index 35507ce..95e7c23 100644 --- a/itf/templates/allauth/account/login.html +++ b/itf/templates/allauth/account/login.html @@ -6,7 +6,7 @@ {% block head_title %}{% trans "Sign In" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Sign In" %}

diff --git a/itf/templates/allauth/account/logout.html b/itf/templates/allauth/account/logout.html index b280b5b..004fbf7 100644 --- a/itf/templates/allauth/account/logout.html +++ b/itf/templates/allauth/account/logout.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Signed Out" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Signed Out" %}

{% trans "You have signed out." %}

diff --git a/itf/templates/allauth/account/password_change.html b/itf/templates/allauth/account/password_change.html index 2762a41..a7cdacb 100644 --- a/itf/templates/allauth/account/password_change.html +++ b/itf/templates/allauth/account/password_change.html @@ -3,7 +3,7 @@ {% load i18n %} {% block head_title %}{% trans "Change Password" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Change Password" %}

diff --git a/itf/templates/allauth/account/password_delete.html b/itf/templates/allauth/account/password_delete.html index b159f36..f744a47 100644 --- a/itf/templates/allauth/account/password_delete.html +++ b/itf/templates/allauth/account/password_delete.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Delete Password" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Delete Password" %}

{% blocktrans %}You may delete your password since you are currently logged in using OpenID.{% endblocktrans %}

diff --git a/itf/templates/allauth/account/password_delete_done.html b/itf/templates/allauth/account/password_delete_done.html index 3cb7ef5..f746353 100644 --- a/itf/templates/allauth/account/password_delete_done.html +++ b/itf/templates/allauth/account/password_delete_done.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Password Deleted" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Password Deleted" %}

{% blocktrans %}Your password has been deleted.{% endblocktrans %}

{% endblock %} diff --git a/itf/templates/allauth/account/password_reset.html b/itf/templates/allauth/account/password_reset.html index dfa3ee0..66e0763 100644 --- a/itf/templates/allauth/account/password_reset.html +++ b/itf/templates/allauth/account/password_reset.html @@ -5,7 +5,7 @@ {% block head_title %}{% trans "Password Reset" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Password Reset" %}

{% if user.is_authenticated %} diff --git a/itf/templates/allauth/account/password_reset_done.html b/itf/templates/allauth/account/password_reset_done.html index e6294c0..a487483 100644 --- a/itf/templates/allauth/account/password_reset_done.html +++ b/itf/templates/allauth/account/password_reset_done.html @@ -5,7 +5,7 @@ {% block head_title %}{% trans "Password Reset" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Password Reset" %}

{% if user.is_authenticated %} diff --git a/itf/templates/allauth/account/password_reset_from_key.html b/itf/templates/allauth/account/password_reset_from_key.html index 510af82..5e80f8c 100644 --- a/itf/templates/allauth/account/password_reset_from_key.html +++ b/itf/templates/allauth/account/password_reset_from_key.html @@ -3,7 +3,7 @@ {% load i18n %} {% block head_title %}{% trans "Change Password" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}

{% if token_fail %} diff --git a/itf/templates/allauth/account/password_set.html b/itf/templates/allauth/account/password_set.html index 42981ea..170ee7e 100644 --- a/itf/templates/allauth/account/password_set.html +++ b/itf/templates/allauth/account/password_set.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Set Password" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Set Password" %}

diff --git a/itf/templates/allauth/account/signup.html b/itf/templates/allauth/account/signup.html index 0d77f60..2981377 100644 --- a/itf/templates/allauth/account/signup.html +++ b/itf/templates/allauth/account/signup.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Signup" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Sign Up" %}

{% if user.is_authenticated %} diff --git a/itf/templates/allauth/account/verification_sent.html b/itf/templates/allauth/account/verification_sent.html index dbed4fc..0c982d5 100644 --- a/itf/templates/allauth/account/verification_sent.html +++ b/itf/templates/allauth/account/verification_sent.html @@ -4,7 +4,7 @@ {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} -{% block content %} +{% block modal_content %}

{% trans "Verify Your E-mail Address" %}

{% blocktrans %}We have sent you an e-mail to {{ email }} for verification. Follow the link provided to finalize the signup process. If you do not receive it within a few minutes, contact us at {{ CONTACT_EMAIL }}.{% endblocktrans %}