K
K
Konstantin Malyarov2018-04-07 22:17:05
Django
Konstantin Malyarov, 2018-04-07 22:17:05

How does Django check if it matches or is empty?

How to return string if value matches date or empty.
For example: 2018-04-07 or NULL.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marataziat, 2018-04-08
@marataziat

Not really clear, but you can just use if

if mymydel.date:
  # В ячейке есть данные
else:
 # их нету

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question