C
C
cicwak2021-01-12 15:12:29
Django
cicwak, 2021-01-12 15:12:29

How to take all values ​​except NULL from django model?

5ffd9172c9b75381842020.png
Above is the table from which you need to take the data.
Tried to use and none of it worked, returns an empty list
akin.objects.filter(character=not 'NULL')
akin.objects.filter(character=not None)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-01-12
@cicwak

Have you tried reading the documentation ?
akin.objects.filter(character__isnull=False)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question