diff --git a/projects/migrations/0005_auto_20160812_1931.py b/projects/migrations/0005_auto_20160812_1931.py new file mode 100644 index 0000000..243034b --- /dev/null +++ b/projects/migrations/0005_auto_20160812_1931.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-08-12 16:31 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0004_merge'), + ] + + operations = [ + migrations.AlterModelOptions( + name='candidate', + options={'ordering': ('position',), 'verbose_name': 'Кандидат', 'verbose_name_plural': 'Кандидаты'}, + ), + ] diff --git a/projects/models.py b/projects/models.py index 0c6cfc7..169ec72 100644 --- a/projects/models.py +++ b/projects/models.py @@ -206,9 +206,10 @@ class Candidate(models.Model): position = models.PositiveIntegerField(default=0) def __str__(self): - return self.answer.user.get_full_name() + return str(self.answer.pk) class Meta: + ordering = ('position',) verbose_name = 'Кандидат' verbose_name_plural = 'Кандидаты' diff --git a/projects/templates/comparison.html b/projects/templates/comparison.html index 8d4cf33..1181df2 100644 --- a/projects/templates/comparison.html +++ b/projects/templates/comparison.html @@ -4,44 +4,47 @@ {% block content %} {% include 'partials/header.html' %} - -
Сравнение кандидатов по проекту
-{{ object }}
-| № | -Кандидат | -Цена | -Срок | -Описание | -Рейтинги/отзывы | -Безопасные сделки | -Решение | -
|---|
| № | +Кандидат | +Цена | +Срок | +Описание | +Рейтинги/отзывы | +Безопасные сделки | +Решение | +
|---|---|---|---|---|---|---|---|
| {{ forloop.counter }} | +|||||||
| {{ cand.position }} | - {{ cand.answer.contractor.get_full_name }} + {{ cand.answer.author.username }} | - +{{ cand.answer.budget }} | - +
{{ cand.answer.term }} {{ cand.answer.term_type }} |
-
+
- + |
|
-
+
0 Готов работать по безопасной сделке |
-
+