L
L
Larisa .•º2017-02-16 13:26:04
Django
Larisa .•º, 2017-02-16 13:26:04

Is it possible to set a filter directly in the model description?

there is a description of the model, for example

class TestModel(models.Model):
    oktmo = models.BigIntegerField(db_column='OKTMO', blank=True, null=True,verbose_name='ОКТМО')  # Field name made lowercase.
    name = models.TextField(blank=True, null=True, verbose_name='Наименование')

Is it possible to immediately set a filter here?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question