Add missing company field to external vacancy model
All checks were successful
release / docker (push) Successful in 22s
All checks were successful
release / docker (push) Successful in 22s
This commit is contained in:
parent
5e7b44f611
commit
af7dbf7246
@ -6,4 +6,4 @@ from vacancies.hh_parser import models
|
||||
class VacancyAdmin(admin.ModelAdmin):
|
||||
list_filter = ("source", "created_at")
|
||||
search_fields = ("title",)
|
||||
list_display = ("title", "source", "link", "created_at")
|
||||
list_display = ("company", "title", "source", "link", "created_at")
|
||||
|
||||
@ -17,13 +17,14 @@ class Vacancy(models.Model):
|
||||
link = models.CharField(max_length=255, null=True, blank=True)
|
||||
address = models.CharField(max_length=255, null=True, blank=True)
|
||||
created_at = models.DateTimeField(null=True, blank=True)
|
||||
company = models.CharField(max_length=255, null=True, blank=True)
|
||||
processed = models.BooleanField()
|
||||
source = models.CharField()
|
||||
|
||||
objects = models.Manager()
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.source} -> {self.id} {self.title}'
|
||||
return f'{self.source}: {self.company} -> {self.id} {self.title}'
|
||||
|
||||
class Meta:
|
||||
managed = False
|
||||
|
||||
@ -34,7 +34,7 @@ class Command(BaseCommand):
|
||||
job_title_id=job_title_id,
|
||||
min_salary_rub=vacancy.min_payment,
|
||||
max_salary_rub=vacancy.max_payment,
|
||||
company_name="",
|
||||
company_name=vacancy.company,
|
||||
requirements=self._remove_tags(vacancy.description),
|
||||
content=self._remove_tags(vacancy.description),
|
||||
timestamp=timezone.make_aware(vacancy.created_at),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user