from django.core.validators import MinValueValidator
price = models.IntegerField(default=0,
max_digits=4,
blank=True,
verbose_name='Цена',
validators=[MinValueValidator(1000)])
{% if listing.realtor == user %}
<a href="{% url 'listing_edit' listing.id %}" class="btn btn-secondary mb-4">
<h5><i class="fas fa-edit"> Редактировать</i></h5>
</a>
<a href="{% url 'listing_delete' listing.id %}" class="btn btn-danger mb-4">
<h5><i class="fa fa-trash-alt"> Удалить</i></h5>
</a>
{% endif %}
listing = form.save(commit=False)
listing.realtor = request.user
listing.save()