@bmispelon@mastodon.social
@bmispelon@mastodon.social avatar

bmispelon

@bmispelon@mastodon.social

💩🔥💻

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bmispelon, to django
@bmispelon@mastodon.social avatar

New article on my blog: a ORM technique I found for combining JSONObject and Subquery to build model instances: https://blog.bmispelon.rocks/articles/2024/2024-05-09-django-getting-a-full-model-instance-from-a-subquery.html

bmispelon,
@bmispelon@mastodon.social avatar

@CodenameTim Yes, this technique should work well for the "latest comment in thread" scenario. That might even have been a better example to use 😅

To be honest I was surprised how far I was able to get, I kept thinking I would hit some fundamental limitation of the ORM at some point, but I never did.

bmispelon,
@bmispelon@mastodon.social avatar

@carlton @lilyf @CodenameTim Possibly, but then you'd lose the ability to defer missing fields.

bmispelon,
@bmispelon@mastodon.social avatar

@carlton @lilyf @CodenameTim It's not yet on github, I'm going to do that later today.

I mention the deferring bit at the end of the post. Basically the idea is that if the jsonobject doesn't contain all the model fields, you can still instanciate the model and the missing fields will be deferred (same as if you'd used Django's .defer()/.only()).

bmispelon,
@bmispelon@mastodon.social avatar

@webology Fixed, thanks 👍

bmispelon,
@bmispelon@mastodon.social avatar
Rachell, (edited ) to random
@Rachell@mastodon.social avatar

I was telling my wife, in Korean, about my Spanish class...and I got two sentences in until I realized I had switched to Spanish without realizing. She doesn't know Spanish. 😅 It's funny, we had a good laugh but frustrating as hell.

Brains are weird. 🤪

Does this happen to you? Any tips on context switching and maintaining that switch?

bmispelon,
@bmispelon@mastodon.social avatar

@Rachell Happens to me a lot when I'm tired.

So I guess my advice is to sleep more? 🙊

Alternatively, you could teach your wife Spanish 😁

(sorry for the somewhat useless answers, I'm hoping someone else in the replies will have actual tips that I could also use for myself)

nanorepublica, to django
@nanorepublica@indiehackers.social avatar

📣 A cautionary tail of adding soft delete to Models
📄 Most of the time you aren't going to need it, but be careful if you do.
🔗 https://softwarecrafts.co.uk/100-words/day-84
,,,-utils,

bmispelon,
@bmispelon@mastodon.social avatar

@nanorepublica another huge annoyance for me is that this kind of soft delete modelling renders field uniqueness completely unusable

treyhunner, to random
@treyhunner@mastodon.social avatar

Apparently unicode.party had 42,800 requests from 3,500 unique visitors over the past 30 days. 😮

I have no idea when this many people started using it or how they found out about it.

I assumed I was one of about 12 users up until now...

/cc @bmispelon

bmispelon,
@bmispelon@mastodon.social avatar

@treyhunner that vpn subscription finally pays off 🙃

bmispelon, to django
@bmispelon@mastodon.social avatar
bmispelon,
@bmispelon@mastodon.social avatar

@webology Thanks!

It's something that's been on the back of my mind for a few years now, but your daily blogging in February really motivated me to actually start doing it.

So really you only have yourself to blame 😁

bmispelon,
@bmispelon@mastodon.social avatar

@webology hashtag sorry not sorry

bmispelon,
@bmispelon@mastodon.social avatar

@benjaoming all the projects I've worked with used factory boy, Soni never had a chance to try that one. Would you recommend it?

nanorepublica, to django
@nanorepublica@indiehackers.social avatar

📣 Native Django alerting package - Responses
📄 Responses to yesterday's post
🔗 https://softwarecrafts.co.uk/100-words/day-80
,,,-response

bmispelon,
@bmispelon@mastodon.social avatar

@nanorepublica Neat idea to do a writeup of the responses like that, thanks for taking the time 👍

May I suggest adding a link to the writeup from the original post?

bmispelon, to random
@bmispelon@mastodon.social avatar

The computer is use daily is a ~7 year old laptop with a somewhat small SSD. I'm not very good at pruning docker images, so I've been routinely low on storage space.

Well today I completely ran out. The reason? I was running the build script for a PaaS command-line tool and it consumed over 4Gb of storage space.
4Gb. For a CLI tool.

What a tech world we made 💩🔥💻

felixxm, to django
@felixxm@fosstodon.org avatar

A month ago, after 5 years of service, I stepped down from the Django Fellowship 💔 💚 I decided to share some raw stats 📊:

Triaged: 3️⃣8️⃣3️⃣4️⃣ 🎫
Reviewed/committed: 3️⃣0️⃣6️⃣7️⃣ PR
Authored: 8️⃣0️⃣7️⃣ PR
Releases issued: 9️⃣2️⃣ 📦

bmispelon,
@bmispelon@mastodon.social avatar

@felixxm What an amazing trac(k) record 🤩

bmispelon, to django
@bmispelon@mastodon.social avatar
bmispelon,
@bmispelon@mastodon.social avatar

@carlton What if we renamed it "djangocon"? 🙃

bmispelon,
@bmispelon@mastodon.social avatar

@adamchainz Now i just need to wait for a release (and to change @carlton 's mind about converting Django's docs) 😁

bmispelon,
@bmispelon@mastodon.social avatar
webology, to random
@webology@mastodon.social avatar

🎉 I had a client meeting postponed until next week at their request, so I have an unexpected free afternoon now.

🕰️ I am going to start Office Hours 30 minutes early and catch up on all the things this afternoon leading up.

I look forward to seeing the regulars and new faces. We had four or five new faces over the last few weeks. https://mastodon.social/@webology/112329125913670748

bmispelon,
@bmispelon@mastodon.social avatar

@webology I don't know if I misunderstood the timezone, but I can't seem to join.

nanorepublica, to django
@nanorepublica@indiehackers.social avatar

📣 Merging a third party package into django core
📄 Question: What would a package look like if it's goal was to be merged into Django core?
🔗 https://softwarecrafts.co.uk/100-words//100-words/day-78
#100_words,#django,#packages,#merging

bmispelon,
@bmispelon@mastodon.social avatar

@nanorepublica looks like the link is broken fyi (returns a 404 for me)

bmispelon,
@bmispelon@mastodon.social avatar

@nanorepublica Very interesting read, thanks.

Makes me wonder if there are many examples of this in Django's history. Migrations and JSON fields come to mind, but that's about it.

As a user, one criteria I'd have would be seamless integration once the package gets merged in to core. Ideally I could just switch the import path and be done with it.

carlton, to random
@carlton@fosstodon.org avatar

The pre-conf for in Madrid the Monday night seems to be shaping up nicely, if you’re still making plans 😉

🚞 to Vigo Tuesday morning

bmispelon,
@bmispelon@mastodon.social avatar

@adamchainz I'm langing at OPO on Monday (3rd) at 19:30 (local time I think). I'd love to meet up if you're up for it.

bmispelon, to random
@bmispelon@mastodon.social avatar

New blog post: A programming joke, etymology, and the challenges with naming things.

https://blog.bmispelon.rocks/articles/2024/2024-04-18-etymology-naming-things-off-by-one-error.html

Warning: may contain traces of Python, Django and some Latin ⚠️

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • rosin
  • thenastyranch
  • GTA5RPClips
  • tester
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • kavyap
  • JUstTest
  • cisconetworking
  • khanakhh
  • normalnudes
  • osvaldo12
  • cubers
  • tacticalgear
  • Durango
  • ethstaker
  • modclub
  • anitta
  • provamag3
  • Leos
  • lostlight
  • All magazines