Skip to content
Advertisement

Tag: django

Django query for column value search?

What is the Django query for this? DB data – I only need record that contain “1.2.3” values not like – (“Cat 1.2.3” or “1.2.3-XY2” or any such value). And pattern “1.2.3” can be anywhere in column where column value can have comma separated values too. Desired Result – When i am performing below Django query – Getting all record

Div Columns not aligning correctly in Django/Python

I’m following along a tutorial and, unfortunately, his code editor automatically indented everything when he copied/pasted a new <div> (Sigh) (In the second pic I cut off the top where it has LOGO in the top right on accident in the screenshot) The problem is i Room.html This is what it currently looks like This is what it should look

How do you run a function to compare two date by month?

I’m trying to run a function to compare today’s month with the month input by a user. The dates will be input by the user as ‘YYYY-MM-DD’. This is what I have so far: But get the following error: fromisoformat: argument must be str So I tried using the following function instead with string: And I get this error: %(value)s”

Django Error: ValueError: Field ‘id’ expected a number but got ‘Нет’

I was adding a new model, but had the error ValueError: Field ‘id’ expected a number but got ‘Нет’. After that I deleted a new model, but error don’t disappear. I tried to change models.py, admin.py, form.py and I even deleted fully models.py, but it didn’t change anything. models.py without choices I can’t makemigrations. Full error: Choices that contains the

Advertisement