Twitter | Search | |
This is the legacy version of twitter.com. We will be shutting it down on 15 December 2020. Please switch to a supported browser or device. You can see a list of supported browsers in our Help Center.
Haki
A software developer and a technical lead. I take special interest in databases, web development, software design and performance tuning.
590
Tweets
122
Following
954
Followers
Tweets
Haki 52m
Replying to @kvalekseev
If the docs recommend... it must be correct! I also made a habit lately to create indexes and complicated constraints in Meta rather than inline in the field. It feels safer, more verbose and you get more control. Nice work BTW on that model AST class, looks handy!
Reply Retweet Like
Haki 1h
Replying to @kvalekseev
just curious, what's your beef with unique_together? A nice addition would be to prevent indexes on text/fields on PostgreSQL. Not sure if many people are aware, but it creates two indexes: a "regular" one and a vatrchar_ops index which is usually big, and useless.
Reply Retweet Like
Haki 1h
Nice project by . Keep your Django project tidy using custom Django checks. I wrote an article about this in the past, and I see some checks made it in. Great job!
Reply Retweet Like
Haki Nov 29
Replying to @JamesTimmins
It's 2020, var $ = document.querySelector and forget about it...
Reply Retweet Like
Haki Nov 28
That was actually my main concern, it's "put together". Too many moving parts makes me feel anxious. For a short term or small projects, that's fine, but for large projects I choose stability over anything else. I've spent nearly zero time adjusting my code to new Django versions
Reply Retweet Like
Haki Nov 28
Replying to @gagliardi_vale
I recently needed to use websockets in a project, and I was looking at FastAP. I went through the entire documentation, and there are definitely some exciting stuff there (mainly DI and typing) but... Too much magic and too much dependencies, so I'm sticking with Django... 🀷
Reply Retweet Like
Haki Nov 27
Replying to @SommeilFestine
Thank man. Glad you liked it ☺️
Reply Retweet Like
Haki Nov 23
So.... are you dealing with errors from signals receivers? How are you making sure they don't go unnoticed?
Reply Retweet Like
Haki Nov 20
Replying to @spookylukey
True story, I can definitely relate! I had no doubt where this is going πŸ˜‰
Reply Retweet Like
Haki Nov 18
I think this makes sense. -> returns jsonb, so you have to cast.
Reply Retweet Like
Haki Nov 18
That's amazing... Gotta love open source πŸ™πŸ™πŸ™
Reply Retweet Like
Haki Nov 16
Replying to @psycopg
Exciting stuff! I really like the new API for copy.
Reply Retweet Like
Haki Nov 15
Replying to @saschaLaLaLa
Nice! I see you reached the same solution πŸ‘Œ
Reply Retweet Like
Haki Nov 15
Replying to @MariuszFelisiak
Thanks! It's been a while since I've hit unexpected and undocumented behavior in Django πŸ˜‰
Reply Retweet Like
Haki Nov 15
Replying to @MariuszFelisiak
Great, thanks :) Is `F('context__day')` also working as expected in the example?
Reply Retweet Like
Haki Nov 15
Replying to @pauloxnet
From what you are saying I understand that KeyTextTransform is the way to go... (just change the import to django.db.models.fields.json) I wonder why `F(context__day)` is not working as expected. Is this a bug or a feature?
Reply Retweet Like
Haki Nov 15
🐍 Just spent the last 30 minutes trying to annotate a key from a JsonField to use in a group by...turned out to be harder than I thought πŸ₯Ί Is there a better way? Or is this undocumented function `KeyTextTransform` the way to go in this case?
Reply Retweet Like
Haki Nov 5
This is very helpful, thanks. I mainly need it as a key value store that will be separate from the main store, fast, persistent and includes encryption. I need to have a look at that link you shared.
Reply Retweet Like
Haki Nov 5
I only considered it at as a store for sensitive information, separate from the main data store which is PostgreSQL. I'm not that familiar with it... do you think this is a good use case for it? (For an environment hosted on aws)
Reply Retweet Like
Haki Nov 5
Funny you mention DynamoDb... I was just looking at it the other day, and I also found it interesting it uses A/N/F... For types but stores everything as text.
Reply Retweet Like