From 07596af1478a190000c77ae22c4f2ec918e646a9 Mon Sep 17 00:00:00 2001 From: Mukhtar Date: Thu, 11 Aug 2016 21:04:09 +0300 Subject: [PATCH] #ARC-27 Fixes bugs --- archilance/settings/base.py | 2 +- templates/partials/footer.html | 18 +- templates/partials/header.html | 4 +- templates/partials/header_guest.html | 30 --- .../registration/activation_complete.html | 17 +- .../registration/registration_complete.html | 15 +- templates/registration/registration_form.html | 179 +++++++------- users/forms.py | 10 +- users/templates/contractor_profile.html | 228 ++++++++++-------- users/templates/contractor_resume_edit.html | 0 users/urls.py | 3 + users/views.py | 26 +- 12 files changed, 301 insertions(+), 231 deletions(-) delete mode 100644 templates/partials/header_guest.html create mode 100644 users/templates/contractor_resume_edit.html diff --git a/archilance/settings/base.py b/archilance/settings/base.py index 9b25660..0600cb5 100644 --- a/archilance/settings/base.py +++ b/archilance/settings/base.py @@ -111,7 +111,7 @@ WSGI_APPLICATION = 'archilance.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'archilance', + 'NAME': 'archilance2', 'USER': 'postgres', 'PASSWORD': 'postgres', 'HOST': 'localhost', diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 3a0e27c..ded4e4c 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -20,19 +20,19 @@

Профиль

@@ -42,23 +42,23 @@ diff --git a/templates/partials/header.html b/templates/partials/header.html index 2e2c01f..351f2aa 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -100,7 +100,7 @@
  • - Сообщения + Сообщения
  • Счет @@ -126,7 +126,7 @@ {% else %} {% endif %} diff --git a/templates/partials/header_guest.html b/templates/partials/header_guest.html deleted file mode 100644 index 1b92e58..0000000 --- a/templates/partials/header_guest.html +++ /dev/null @@ -1,30 +0,0 @@ -{% load staticfiles %} - diff --git a/templates/registration/activation_complete.html b/templates/registration/activation_complete.html index c390e5f..a1ceeb1 100644 --- a/templates/registration/activation_complete.html +++ b/templates/registration/activation_complete.html @@ -1 +1,16 @@ -

    Активация пользователя

    +{% extends 'partials/base.html' %} + +{% block content %} + {% include 'partials/header.html' %} +
    +
    + +
    +

    Активация пользователя

    +
    + {% include 'partials/footer.html' %} + +
    +
    + +{% endblock %} diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html index 39bfc69..d349892 100644 --- a/templates/registration/registration_complete.html +++ b/templates/registration/registration_complete.html @@ -1,7 +1,16 @@ {% extends 'partials/base.html' %} {% block content %} -
    -

    Регистрация прошла успешно

    -
    + {% include 'partials/header.html' %} +
    +
    + +
    +

    Регистрация прошла успешно

    +
    + {% include 'partials/footer.html' %} + +
    +
    + {% endblock %} diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html index c972e3e..285f4d9 100644 --- a/templates/registration/registration_form.html +++ b/templates/registration/registration_form.html @@ -1,100 +1,103 @@ {% extends 'partials/base.html' %} {% block content %} {% include 'partials/header.html' %} -
    -

    Регистрация

    -
    -
    -
    {% csrf_token %} - {{ form.errors }} -
    - {% if request.GET.type == 'customer' %} - - {% elif request.GET.type == 'contractor' %} - - {% else %} -
    - -
    - {% endif %} -
    -
    - -
    -
    - -
    -
    - -
    +
    +
    +
    +

    Регистрация

    +
    +
    + {% csrf_token %} + {{ form.errors }} +
    + {% if request.GET.type == 'customer' %} + + {% elif request.GET.type == 'contractor' %} + + {% else %} +
    + +
    + {% endif %} +
    +
    + +
    +
    + +
    +
    + +
    -
    - -
    -
    - -
    -
    -
    -
    +
    + +
    +
    + +
    +
    -
    - - fb - -
    +
    +
    +
    -
    - - tw - -
    +
    + + fb + +
    -
    - - gplus - -
    +
    + + tw + +
    -
    - - vk - -
    +
    + + gplus + +
    -
    - - yt - -
    +
    + + vk + +
    -
    -
    +
    + + yt + +
    + +
    +
    +
    +
    +
    + +

    Регистрируясь, я подтверждаю свое согласие у условиями пользавательского + соглашения

    +
    +
    + + -
    -
    - -

    Регистрируясь, я подтверждаю свое согласие у условиями пользавательского соглашения

    -
    -
    - - -
    -{#

    Регистрация

    #} -{#
    #} -{# {% csrf_token %}#} -{# {% for field in form %}#} -{#
    #} -{# {{ field.label }}#} -{# {{ field }}#} -{#
    #} -{# {% endfor %}#} -{# #} -{#
    #} + +
    + + {% include 'partials/footer.html' %} +
    +
    {% endblock %} diff --git a/users/forms.py b/users/forms.py index ffc6acf..fa12a56 100644 --- a/users/forms.py +++ b/users/forms.py @@ -2,7 +2,7 @@ from django import forms import itertools import pydash as _; _.map = _.map_; _.filter = _.filter_ -from .models import User, UserFinancialInfo, Team, GENDERS +from .models import User, UserFinancialInfo, Team, ContractorResume, GENDERS from common.models import Location from projects.models import Project, Realty, BuildingClassfication, ConstructionType from specializations.models import Specialization @@ -18,6 +18,14 @@ class TeamForm(forms.ModelForm): ) +class ContractorResumeForm(forms.ModelForm): + + class Meta: + model = ContractorResume + fields = ( + 'text', + ) + class UserProfileEditForm(forms.ModelForm): gender = forms.ChoiceField( choices=GENDERS, diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html index 45760a1..e2c53ba 100644 --- a/users/templates/contractor_profile.html +++ b/users/templates/contractor_profile.html @@ -66,11 +66,11 @@

    Россия, Москва

    - + {% if contractor.contractor_status == 'free' %}
    Свободен
    {% endif %} - + показать контакты
    @@ -110,27 +110,28 @@
    - {% if contractor.pk == request.user.pk %} - + {% if contractor.pk == request.user.pk %} + -