Working with #django and #vuejs I'm using custom tokens so that VueJS and Django tokens don't conflict, but I also have a need to escape to ensure users can't get my VueJS delimiters anywhere.
Is there a place I can hook in to add my own, additional escape code 🤔, or am I doomed to have to add {{value|myescape}} everywhere a value is used 😢
@kfdm it might not be what you're after, but if you can control the value that gets passed to the context, you should be able to implement a custom html() method and Django should honor that when outputting the value in the template.
@kfdm If you do write up something please let me know, it sounds like an intriguing problem (for one thing, I would not expect a modelform with failed validation to change anything on its instance, but I might very much be wrong)
@carlton Very much in agreement on the idea, but I'm personally not a big fan of the word "moron". It's got quite a violent history and meaning if you ask me. If you're open to suggestions, how about "fools"?
👀 So it's a rare Saturday when I'm working because I shifted my week to take a Monday off, and I'm getting logged out of the Django Admin (localhost + Django 5.0.4) every ~5 seconds.
My console shows:
> django.security.SuspiciousSession WARNING Session data corrupted
This issue seemed to go away after I re-ran collectstatic to fix a few broken images. (It already gets ran at least twice).
🤔 I am not sure if this is a new Django bug or if anyone else is seeing this?
@_chrismay I would assume the cloud provider lets you pass a callback URL when you upload the file. Then you can update your model's filefield in that view.
Just spent an hour of my morning trying to debug why my queryset annotation wasn't working.
Turns out I'd written "fist_name" instead of "first_name" and the error message had been telling me all along but my eyes glossed over it 👊🏻
@apollo13 We're Python 3.8 for now, but 3.11 is on the roadmap soon hopefully.
Did you ever manage to reproduce the issue locally, or is this all in prod? (we do have Sentry but I'd rather be able to at least get a sense of things locally before we roll things out)
django.db.utils.OperationalError: generated columns cannot be part of the PRIMARY KEY
Oh come one, I really thought that one was going to work (interesting that Django was happy to generate the migration but only failed when trying to apply it) 🤔
@shaib Isn't the virtual-ness controlled by the db_persist kwarg? The field should have enough information to yell at me at instanciation time, no?
Good point about the backend though. The exception is indeed raised in the db backend (sqlite in this case). I should try to see if postgres behaves different.