diff --git a/archilance/management/commands/generate_projects.py b/archilance/management/commands/generate_projects.py index 4ef30fe..099330c 100644 --- a/archilance/management/commands/generate_projects.py +++ b/archilance/management/commands/generate_projects.py @@ -70,7 +70,7 @@ class Command(BaseCommand): project.specialization = Specialization.objects.root_nodes()[0].get_descendants().order_by('?').first() project.realty = Realty.objects.order_by('?').first() - project.customer = User.objects.filter(groups__name='Заказчики', is_active=True, is_superuser=False).order_by('?').first() + project.customer = User.customer_objects.filter(is_active=True).order_by('?').first() project.save() diff --git a/projects/models.py b/projects/models.py index 22618da..a296928 100644 --- a/projects/models.py +++ b/projects/models.py @@ -124,10 +124,10 @@ class Answer(models.Model): term = models.IntegerField(default=0) term_type = models.CharField(max_length=10, choices=TERMS, default='hour') text = models.TextField() - + def __str__(self): return self.text - + class Meta: verbose_name = 'Ответ к проекту' verbose_name_plural = 'Ответы к проектам' diff --git a/projects/templates/project_detail.html b/projects/templates/project_detail.html index 04f3f27..5808868 100644 --- a/projects/templates/project_detail.html +++ b/projects/templates/project_detail.html @@ -1,6 +1,5 @@ {% extends 'partials/base.html' %} -{% load staticfiles %} {% load humanize %} @@ -15,16 +14,18 @@
-

{{ project.budget | intcomma }}

+

{{ project.budget|intcomma }}

-
- execitor-image -
+ +
+ execitor-image +
+

{{ project.customer.get_full_name }} [{{ project.customer }}]

- +