From 519561d488394ffe7390a3a8cf57c796674e2039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=9A=D0=BE=D1=82=D1=8E?= =?UTF-8?q?=D0=BA?= Date: Mon, 12 Jan 2015 15:44:50 +0200 Subject: [PATCH 1/2] Task 41 --- accounts/views.py | 2 +- proj/settings.py | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/accounts/views.py b/accounts/views.py index f39782ac..6dabcd25 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -441,7 +441,7 @@ def change_password(request): from django.views.generic.edit import FormMixin class Feed(ListView): template_name = 'client/accounts/feed.html' - paginate_by = 5 + paginate_by = 10 model = Exposition filter_form = FeedFilterForm success_url = '/profile/feed/' diff --git a/proj/settings.py b/proj/settings.py index 72e66aea..6c59c3b0 100644 --- a/proj/settings.py +++ b/proj/settings.py @@ -223,15 +223,20 @@ LOGIN_URL='/' #registration info ACCOUNT_ACTIVATION_DAYS=2 # mail settings -EMAIL_USE_TLS = True -EMAIL_HOST = 'smtp.gmail.com' -#EMAIL_HOST = 'localhost' +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +EMAIL_HOST = 'localhost' +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +EMAIL_USE_TLS = False +EMAIL_PORT = 25 +#test +#EMAIL_USE_TLS = True +#EMAIL_HOST = 'smtp.gmail.com' #EMAIL_HOST_USER = 'kotzilla' -EMAIL_HOST_USER = 'kotzillla@gmail.com' -EMAIL_HOST_PASSWORD = 'fitteR2006!' +#EMAIL_HOST_USER = 'kotzillla@gmail.com' +#EMAIL_HOST_PASSWORD = 'fitteR2006!' - -EMAIL_PORT = 587 +#EMAIL_PORT = 587 #DEFAULT_FROM_EMAIL = 'kotzillla@gmail.com' From e55528d67135570dc417d31a29ce5279b3e1f775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=9A=D0=BE=D1=82=D1=8E?= =?UTF-8?q?=D0=BA?= Date: Mon, 12 Jan 2015 15:56:22 +0200 Subject: [PATCH 2/2] Fix add company form --- accounts/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/accounts/views.py b/accounts/views.py index 6dabcd25..7a6413ce 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -213,11 +213,9 @@ class UserView(TemplateView): 'home_form': HomeForm(instance=profile), 'work_form': WorkForm(instance=user), 'about_company_form': AboutCompanyForm(instance=profile), 'phone_form': PhoneForm(instance=profile), 'email_form': EmailForm(instance=user), 'web_page_form': WebPageForm(instance=profile), - 'social_form': SocialForm(instance=profile), 'about_form': AboutForm(instance=profile) + 'social_form': SocialForm(instance=profile), 'about_form': AboutForm(instance=profile), + 'company_form': CreateCompanyForm() } - if not user.company: - company_form = {'company_form': CreateCompanyForm()} - context.update(company_form) context.update(profile_forms)