From 470ab1900a5d89a5b239963a2e9a41ed14a157ba Mon Sep 17 00:00:00 2001 From: ArturBaybulatov Date: Mon, 6 Jun 2016 21:07:21 +0300 Subject: [PATCH] Renew templates --- projects/templates/comparison.html | 84 +++ .../contractor_project_detail.html | 0 .../templates/customer_project_create.html | 231 +++++++ .../customer_project_detail.html | 0 projects/templates/projects/comparison.html | 67 -- projects/templates/{projects => }/test.html | 0 .../templates/{projects => }/test_form.html | 0 projects/views.py | 12 +- templates/home.html | 6 + .../{users => }/contractor_list.html | 0 users/templates/contractor_office.html | 247 ++++++++ users/templates/contractor_profile.html | 430 +++++++++++++ .../customer.html => customer_profile.html} | 128 ++-- users/templates/users/contractor.html | 572 ------------------ .../{users => }/users_info_list.html | 0 users/templates/{users => }/users_list.html | 0 users/urls.py | 11 +- users/views.py | 24 +- 18 files changed, 1094 insertions(+), 718 deletions(-) create mode 100644 projects/templates/comparison.html rename projects/templates/{projects => }/contractor_project_detail.html (100%) create mode 100644 projects/templates/customer_project_create.html rename projects/templates/{projects => }/customer_project_detail.html (100%) delete mode 100644 projects/templates/projects/comparison.html rename projects/templates/{projects => }/test.html (100%) rename projects/templates/{projects => }/test_form.html (100%) rename users/templates/{users => }/contractor_list.html (100%) create mode 100644 users/templates/contractor_office.html create mode 100644 users/templates/contractor_profile.html rename users/templates/{users/customer.html => customer_profile.html} (52%) delete mode 100644 users/templates/users/contractor.html rename users/templates/{users => }/users_info_list.html (100%) rename users/templates/{users => }/users_list.html (100%) diff --git a/projects/templates/comparison.html b/projects/templates/comparison.html new file mode 100644 index 0000000..e960665 --- /dev/null +++ b/projects/templates/comparison.html @@ -0,0 +1,84 @@ +{% extends 'partials/base.html' %} + +{% load staticfiles %} + +{% block content %} + {% include 'partials/header.html' %} + +
+
+
+

Сравнение кандидатов по проекту

+
+ +
+
+

{{ object }}

+ + + + + + + + + + + + + + {% for cand in object.candidates.all %} + + + + + + + + + + + + + + + + + + {% endfor %} +
КандидатЦенаСрокОписаниеРейтинги/отзывыБезопасные сделкиРешение
1 + + {{ cand.answer.user.get_full_name }} + {{ cand.answer.cost }} + {{ cand.answer.term }}
недели +
+ + +
    +
  • 23 560
  • +
  • + +385 + 0 + - 0 +
  • +
  • + СРО +
  • +
+
+ 5
+ Готов работать по безопасной сделке +
+
+
+
+
+
+
+
+
+ + {% include 'partials/footer.html' %} +
+
+{% endblock %} diff --git a/projects/templates/projects/contractor_project_detail.html b/projects/templates/contractor_project_detail.html similarity index 100% rename from projects/templates/projects/contractor_project_detail.html rename to projects/templates/contractor_project_detail.html diff --git a/projects/templates/customer_project_create.html b/projects/templates/customer_project_create.html new file mode 100644 index 0000000..881a219 --- /dev/null +++ b/projects/templates/customer_project_create.html @@ -0,0 +1,231 @@ +{% extends 'partials/base.html' %} + +{% block content %} + {% include 'partials/header.html' %} + +
+
+
+

Новый заказ

+
+
+
+

Формирование заказа

+
+

Название заказа

+ +
+
+

Подробно опишите задание

+ +
+
+
+
+

Дополнительно

+
+
+
+
+ +

+ добавить файл (до 100 файлов)

+
+
+
    +
  • + Архитерурное 2.jpg + 7мб +
    +
  • +
  • + Архитерурное 2.jpg + 7мб +
    +
  • +
+
+

Тип работы:

+
+
+ +

Проектирование

+
+
+ +

Техническое сопровождение

+
+
+ +
+
+
+
+
+
Специализация проекта:
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
Бюджет
+
+
+
+
+ + +
+
+ +
+
+ +

или по договоренности

+
+
+
+ +

Сделать для исполнителей обязательным для заполнения поля цена и срок

+
+
+
Способ оплаты
+
+
+
+ +

+ Безопасная сделка (с резервированием бюджета) +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro vel suscipit eaque quidem voluptate aperiam enim aut libero, excepturi architecto maxime, placeat maiores, odio itaque, ex consectetur dignissimos dicta officia. +

+
+
+ +

+ Прямая оплата Исполнителю на его кошелек/счет +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro vel suscipit eaque quidem voluptate aperiam enim aut libero, excepturi architecto maxime, placeat maiores, odio itaque, ex consectetur dignissimos dicta officia. +

+
+
+
+
+

Расширенный поиск

+ +
+
+
+
+
+
+
+
Выбор объекта:
+
Наименование:
+
Классификация здания:
+
Вид строительства:
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
Местоположение:
+
+
+
+ +
+
+ +
+
+ +

Требуется допуск СРО

+
+
+ +
+
+
+ + {% include 'partials/footer.html' %} +
+
+{% endblock %} diff --git a/projects/templates/projects/customer_project_detail.html b/projects/templates/customer_project_detail.html similarity index 100% rename from projects/templates/projects/customer_project_detail.html rename to projects/templates/customer_project_detail.html diff --git a/projects/templates/projects/comparison.html b/projects/templates/projects/comparison.html deleted file mode 100644 index 6817cfa..0000000 --- a/projects/templates/projects/comparison.html +++ /dev/null @@ -1,67 +0,0 @@ - -{% extends 'partials/base.html' %} -{% load staticfiles %} -{% block content %} -
-

Сравнение кандидатов по проекту

-
-
-
-

{{ object }}

- - - - - - - - - - - - {% for cand in object.candidates.all %} - - - - - - - - - - - - {% endfor %} - -
КандидатЦенаСрокОписаниеРейтинги/отзывыБезопасные сделкиРешение
1 - - {{ cand.answer.user.get_full_name }} - {{ cand.answer.cost }} - {{ cand.answer.term }}
недели -
- - -
    -
  • 23 560
  • -
  • - +385 - 0 - - 0 -
  • -
  • - СРО -
  • -
-
- 5
- Готов работать по безопасной сделке -
-
-
-
-
-
-
-
-
-{% endblock %} diff --git a/projects/templates/projects/test.html b/projects/templates/test.html similarity index 100% rename from projects/templates/projects/test.html rename to projects/templates/test.html diff --git a/projects/templates/projects/test_form.html b/projects/templates/test_form.html similarity index 100% rename from projects/templates/projects/test_form.html rename to projects/templates/test_form.html diff --git a/projects/views.py b/projects/views.py index 6816dd2..82fbe8b 100644 --- a/projects/views.py +++ b/projects/views.py @@ -24,7 +24,7 @@ class ProjectListView(ListView): class ProjectDetailView(LastAccessMixin, FormMixin, View): model = Project form_class = AnswerForm - template_name = 'projects/contractor_project_detail.html' + template_name = 'contractor_project_detail.html' def get_success_url(self): return reverse('projects:detail', kwargs={'pk': self.object.pk}) @@ -41,7 +41,7 @@ class ProjectDetailView(LastAccessMixin, FormMixin, View): def get(self, request, *args, **kwargs): if request.user.is_customer(): - self.template_name = 'projects/customer_project_detail.html' + self.template_name = 'customer_project_detail.html' project = get_object_or_404(Project, pk=kwargs.get('pk')) return render(request,self.template_name,{'project': project}) @@ -74,7 +74,7 @@ class ProjectCreateView(PermissionRequiredMixin, View): permission_required = ('projects.add_project',) project_form = ProjectForm realty_form = RealtyForm - template_name = 'projects/project_form.html' + template_name = 'customer_project_create.html' def get(self, request, *args, **kwargs): project_form = self.project_form() @@ -101,7 +101,7 @@ class ProjectCreateView(PermissionRequiredMixin, View): class TestView(View): - template_name = 'projects/test_form.html' + template_name = 'test_form.html' form_class = RealtyForm form_second = ProjectForm @@ -134,7 +134,7 @@ class TestView(View): class TestProjectView(View): model = Project form_class = ProjectForm - template_name = 'projects/test.html' + template_name = 'test.html' success_url = '/projects/' def get_context_data(self, **kwargs): @@ -179,7 +179,7 @@ class TestProjectView(View): class ProjectComparisonView(DetailView): model = Project - template_name = 'projects/comparison.html' + template_name = 'comparison.html' def get_context_data(self, **kwargs): context = super().get_context_data() diff --git a/templates/home.html b/templates/home.html index 13d054d..996c772 100644 --- a/templates/home.html +++ b/templates/home.html @@ -7,6 +7,12 @@

Основная задача сайта

+ +

+ Authed? {{ user.is_authenticated }}c + {{ user }}
+ {{ user.groups.all }} +

diff --git a/users/templates/users/contractor_list.html b/users/templates/contractor_list.html similarity index 100% rename from users/templates/users/contractor_list.html rename to users/templates/contractor_list.html diff --git a/users/templates/contractor_office.html b/users/templates/contractor_office.html new file mode 100644 index 0000000..2123388 --- /dev/null +++ b/users/templates/contractor_office.html @@ -0,0 +1,247 @@ +{% extends 'partials/base.html' %} + +{% load staticfiles %} + +{% block content %} + {% include 'partials/header.html' %} + +
+
+
+

Личный кабинет

+
+ +
+ +
+ +
+
+ + + +
+
+ +
+
+
+
+
+ profile-image +
+
+ + +
+ +
+
+

+ Название группы +

+

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

+ + + +
Label
+ написать сообщение +
+ +
+
+

+ Специализации: +

+
+ Интерьеры + 2-й +
+
+ Визуализация/3D + 45-й +
+
+ Экстерьеры + 10-й +
+
+ Архитектура + 3-й +
+
+ 3D Моделирование + 100-й +
+
+
+ + +
+ + + +
+

Добавить работу

+
+ +
+
+
+
+
+
+
+
+

+ Визуализация + загородного + дома 1500m2 +

+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+

+ Визуализация + загородного + дома 1500m2 +

+
+
+ +
+
+ +
+
+
+
+
+
+
+ + {% include 'partials/footer.html' %} +
+
+{% endblock %} diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html new file mode 100644 index 0000000..af379d0 --- /dev/null +++ b/users/templates/contractor_profile.html @@ -0,0 +1,430 @@ +{% extends 'partials/base.html' %} + +{% load staticfiles %} + +{% block content %} + {% include 'partials/header.html' %} + +
+
+
+ +
+
+

+ Иванов Петр Иванович [ivanov_petr] +

+

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

+ +
Свободен
+ показать контакты +
+
+
+

+ Специализации: +

+
+ Интерьеры + 2-й +
+
+ Визуализация/3D + 45-й +
+
+ Экстерьеры + 10-й +
+
+ Архитектура + 3-й +
+
+ 3D Моделирование + 100-й +
+
+
+ +
+ + +
+
+ + +
+ {% for p in user.portfolio.all %} +
+
+
+
+
+
+
+

{{ p.name }}

+
+
+ +
+
+ +
+
+
+
+ {% endfor %} +
+ + +
+ +
+ +
+
+
+
+
+
+
+
+ 35 000 +
+
+
+
+

+ Визуализация + загородного + дома 1500m2 +

+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ 35 000 +
+
+
+
+

+ Визуализация + загородного + дома 1500m2 +

+
+
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+
+ +

Загрузить резюме

+
+
+ +

Загрузить файл

+
+
+
+
+
+ profile-image +
+
+
+
+

Иванов Петр Сергеевич

+ скачать резюме +

+ Мужчина, 24 года, 14 февраля 1991 +

+
+
+
    +
  • brilliantov.me
  • +
  • alex@brilliantov.me
  • +
  • +7 968 009 19 99
  • +
  • Россия, Москва
  • +
+
+
+
+

+ Специализации: +

+
+ Интерьеры + 2-й +
+
+ Визуализация/3D + 45-й +
+
+
+
+
+
+
+
+
+

Что я умею 1?

+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut perspiciatis ducimus ullam saepe sed! Architecto sit, repellendus illo ut odio amet facilis distinctio veniam nulla consequatur a sequi deleniti aperiam! + +
+
+

Что я умею 2?

+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut perspiciatis ducimus ullam saepe sed! Architecto sit, repellendus illo ut odio amet facilis distinctio veniam nulla consequatur a sequi deleniti aperiam! + +
+
+

Что я умею 3?

+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut perspiciatis ducimus ullam saepe sed! Architecto sit, repellendus illo ut odio amet facilis distinctio veniam nulla consequatur a sequi deleniti aperiam! + +
+
+
+
+

Дипломы / Сертификаты

+
+ +

Загрузить файл

+
+
+ +
+
+
+
+
+
+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. +

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. +

+
+
+ +
+
+
+
+ +
+
+
+

Допуск СРО

+
+ +

Загрузить файл

+
+
+ +
+
+
+
+
+
+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. +

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. +

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+

+ Иванов Петр Иванович +

+ + Безопасная сделка + + +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget odio. +

+
+
+
+
+ +
+ {% include 'partials/footer.html' %} +
+
+
+
+{% endblock %} diff --git a/users/templates/users/customer.html b/users/templates/customer_profile.html similarity index 52% rename from users/templates/users/customer.html rename to users/templates/customer_profile.html index 9fa1040..308cc54 100644 --- a/users/templates/users/customer.html +++ b/users/templates/customer_profile.html @@ -1,28 +1,37 @@ {% extends 'partials/base.html' %} + {% block content %} + {% include 'partials/header.html' %} + +
+ +
+
+
-
+
+

Разместить заказ

+
- {% for proj in object.projects.all %} -
-
-

- {{ proj.name }} -

-
    -
  • - Объект "{{ proj.realty.name }}" -
  • -
  • - 0 ответ от имени группы -
  • -
- -

- {{ proj.text }} -

-
    -
  • {{ proj.created}}
  • -
  • 0
  • -
  • 0
  • -
  • {{ object.get_full_name }}
  • -
-
-
-

- {{ proj.price }} -

-
    -
  • - Редактировать -
  • -
  • - Переместить в корзину -
  • -
-
-
- {% endfor %} -
+ {% for proj in object.projects.all %} +
+
+

+ {{ proj.name }} +

+ +
    +
  • Объект "{{ proj.realty.name }}"
  • +
  • 0 ответ от имени группы
  • +
+ + + +

+ {{ proj.text }} +

+ +
    +
  • {{ proj.created}}
  • +
  • 0
  • +
  • 0
  • +
  • {{ object.get_full_name }}
  • +
+
+ +
+

+ {{ proj.price }} +

+ +
    +
  • Редактировать
  • +
  • Переместить в корзину
  • +
+
+
+ {% endfor %} + + + {% endblock %} diff --git a/users/templates/users/contractor.html b/users/templates/users/contractor.html deleted file mode 100644 index cfc83ed..0000000 --- a/users/templates/users/contractor.html +++ /dev/null @@ -1,572 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% block content %} -

{{ user }}

-
-
-
- -
-
-

- Иванов Петр Иванович [ivanov_petr] -

-

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

- -
Свободен
- показать контакты -
-
-
-

- Специализации: -

-
- Интерьеры - 2-й -
-
- Визуализация/3D - 45-й -
-
- Экстерьеры - 10-й -
-
- Архитектура - 3-й -
- -
-
- -
- -
-
- -
- {% for p in user.portfolio.all %} -
-
-
-
-
-
-
-

{{ p.name }}

-
-
- -
-
- -
-
-
-
- {% endfor %} -
- -
-
- -
-
-
-
-
-
-
-
- 35 000 -
-
-
-
-

- Визуализация - загородного - дома 1500m2 -

-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- 35 000 -
-
-
-
-

- Визуализация - загородного - дома 1500m2 -

-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- 35 000 -
-
-
-
-

- Визуализация - загородного - дома 1500m2 -

-
-
- -
-
- -
-
-
-
-
- -
-
-
-
- -

Загрузить резюме

-
-
- -

Загрузить файл

-
-
-
-
-
- profile-image -
-
-
-
-

Иванов Петр Сергеевич

- скачать резюме -

- Мужчина, 24 года, 14 февраля 1991 -

-
-
-
    -
  • brilliantov.me
  • -
  • alex@brilliantov.me
  • -
  • +7 968 009 19 99
  • -
  • Россия, Москва
  • -
-
-
-
-

- Специализации: -

-
- Интерьеры - 2-й -
-
- Визуализация/3D - 45-й -
-
-
-
-
-
-
-
-
-

Что я умею?

- - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut perspiciatis ducimus ullam saepe sed! Architecto sit, repellendus illo ut odio amet facilis distinctio veniam nulla consequatur a sequi deleniti aperiam! - -
-
-

Что я умею?

- - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut perspiciatis ducimus ullam saepe sed! Architecto sit, repellendus illo ut odio amet facilis distinctio veniam nulla consequatur a sequi deleniti aperiam! - -
-
-

Что я умею?

- - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut perspiciatis ducimus ullam saepe sed! Architecto sit, repellendus illo ut odio amet facilis distinctio veniam nulla consequatur a sequi deleniti aperiam! - -
-
-
-
-

Дипломы / Сертификаты

-
- -

Загрузить файл

-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-

Допуск СРО

-
- -

Загрузить файл

-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. -

-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-

- Иванов Петр Иванович -

- - Безопасная сделка - - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget odio. -

-
-
-
-
-
- -
-
-{% endblock %} diff --git a/users/templates/users/users_info_list.html b/users/templates/users_info_list.html similarity index 100% rename from users/templates/users/users_info_list.html rename to users/templates/users_info_list.html diff --git a/users/templates/users/users_list.html b/users/templates/users_list.html similarity index 100% rename from users/templates/users/users_list.html rename to users/templates/users_list.html diff --git a/users/urls.py b/users/urls.py index 87fc239..5f181ef 100755 --- a/users/urls.py +++ b/users/urls.py @@ -1,16 +1,19 @@ from django.conf import urls from django.contrib.auth.views import login, logout -from .views import UserListView, UserDetailView, UserInfoListView, CustomerView,\ - UserView, ContractorDetailView, ContractorListView +from .views import UserListView, UserDetailView, UserInfoListView, CustomerProfileView,\ + UserView, ContractorProfileDetailView, ContractorListView, ContractorOfficeDetailView + app_name = 'users' + urlpatterns = [ urls.url(r'^profile/$', UserDetailView.as_view(), name='user-detail'), urls.url(r'^$', UserListView.as_view(), name='users_list'), urls.url(r'^info$', UserInfoListView.as_view(), name='users_info_list'), urls.url(r'contractors/$', ContractorListView.as_view(), name='contractor-list' ), - urls.url(r'^contractor/(?P\d+)$', ContractorDetailView.as_view(), name='contractor-view'), - urls.url(r'^customer/(?P\d+)$', CustomerView.as_view(), name='customer-view'), + urls.url(r'^contractors/(?P\d+)$', ContractorProfileDetailView.as_view(), name='contractor-view'), + urls.url(r'^contractor-office/(?P\d+)$', ContractorOfficeDetailView.as_view(), name='contractor-office'), + urls.url(r'^customers/(?P\d+)$', CustomerProfileView.as_view(), name='customer-view'), urls.url(r'^(?P\d+)$', UserView.as_view(), name='user_view'), ] diff --git a/users/views.py b/users/views.py index 41ec904..3dc9f1c 100644 --- a/users/views.py +++ b/users/views.py @@ -6,13 +6,13 @@ from .models import User class UserListView(ListView): model = User - template_name = 'users/users_list.html' + template_name = 'users_list.html' context_object_name = 'users' class UserInfoListView(ListView): model = User - template_name = 'users/users_info_list.html' + template_name = 'users_info_list.html' def get_context_data(self, **kwargs): context = super(UserInfoListView, self).get_context_data(**kwargs) @@ -28,7 +28,7 @@ class UserDetailView(DetailView): class UserView(View): pass - # template_name = 'users/contractor.html' + # template_name = 'contractor.html' # # def get(self, request, pk): # user = User.objects.get(pk=pk) @@ -49,12 +49,12 @@ from django.shortcuts import redirect class ContractorListView(ListView): model = User - template_name = 'users/contractor_list.html' + template_name = 'contractor_list.html' -class ContractorDetailView(DetailView): +class ContractorProfileDetailView(DetailView): model = User - template_name = 'users/contractor.html' - + template_name = 'contractor_profile.html' + # def get_object(self, queryset=None): # object = super().get_object() # user_group = object.groups.all().first() @@ -62,10 +62,10 @@ class ContractorDetailView(DetailView): # return redirect('/projects/') # return object - -class CustomerView(DetailView): +class ContractorOfficeDetailView(DetailView): model = User - template_name = 'users/customer.html' - - + template_name = 'contractor_office.html' +class CustomerProfileView(DetailView): + model = User + template_name = 'customer_profile.html'