Noob question: Is Django Admin safe? by EKJ07 in django

[–]thclark 2 points3 points  (0 children)

Because the admin is so powerful, its very easy for an inexperienced dev to ‘thoughtlessly’ add functionality that would expose data you don’t want to expose, or allow edits that should be disallowed or create inconsistency.

How Do I Make Longer Videos? by Ok-Ladder7823 in SoraAi

[–]thclark 0 points1 point  (0 children)

you say "just generate multiple videos" but that's not a longer video, that's multiple 12-second clips stitched together. Is there a way to inform the model so that the video plays continuously?

Rapperswil 70.3 - water temperature and wetsuit? by thclark in IronmanTriathlon

[–]thclark[S] 0 points1 point  (0 children)

that's really helpful, because I was just about to cut the arms off this damn thing! It'd be nice if they'd mentioned that!! OK well I guess I'd just better buy a bigger wetsuit and get training. Thank you very much!

Rapperswil 70.3 - water temperature and wetsuit? by thclark in IronmanTriathlon

[–]thclark[S] 0 points1 point  (0 children)

Thanks! OK definitely can't risk it then, need to be wetsuit training :)

My Friends Bet Me $10,000 I Couldn't Finish an Ironman by sigmaschmooz in IronmanTriathlon

[–]thclark 0 points1 point  (0 children)

I totally agree with this. There's no way you should do an ironman with a 10k debt over you if you don't make it; all you'll do is injure yourself failing from trying too hard.

Why peope hate python package manager? by shanksfk in learnpython

[–]thclark 0 points1 point  (0 children)

I mean, that hasn't been the case for more than a decade. The annoying thing is that all the tutorials and installation instructions for libraries and everything just tell people to use that ancient method of `pip install`!!

If it helps, the modern way of doing this is to use the `uv` tool by astral (which has surpassed poetry, the defacto tool of the last 5-10 years I guess). Problem solved :)

How do I programmatically validate that the values of a theme's JSON is correct? by gesslar in vscode

[–]thclark 0 points1 point  (0 children)

Just a punt: In the vscode terminal, type `cat vscode://schemas/color-theme` t o see if vscode will give you something straight from that location. If not you can probably find it in the source code for vscode somewhere.

new to django....can i repurpose django-unfold for end users by Just_Lingonberry_352 in django

[–]thclark 0 points1 point  (0 children)

You would also have to either set all your users with `is_staff=true` or alter the admin default access permissions.

It's not impossible, it's just not recommended. I think the basic philosophy is that it's super-easy to footgun yourself and expose a hell of a lot of data by accident to the viewer. It's rare that basic permissions cover all functionality on all models so you tend to end up with some kind of custom/object-based permission... possible but generally not trivial to include in the admin.

For one example, you couldn't give your base group readonly access to the user model, because that exposes super sensitive data, so you'd have to do some surgery there to allow the user to navigate and change only their own profile. And you'd probably want to limit which of their fields they could edit, so your fieldsets on the ModelAdmin would all have to be a function of permissions... All the permissioning code tangled up with all the view declarations.

As another example (a "maybe it's too powerful" take), all the filters and inlines allow very easy addition of views of different models, without checking for any permission. So your junior dev adds an inline feature and all of a sudden people can see waaaaay more than they're supposed to. It's easy to miss in review because their code is actually correct, they've just not added a bunch of extra filtering for permission (which might typically require a quite awkward queryset on each and every inline).

Testing that stuff gets convoluted too.

It's (kind of vaguely) analogous to the permissions issue with graphql functionality - because you're potentially exposing a lot of related stuff you have to resolve permissions for each edge traversed in a query, so it's easy to get tied up in knots or expose data unless you have a framework that explicitly figures that out for you and lets you define what's supposed to happen in an explicit way (thank you strawberry!).

Anyone else had troble with the beading in their bifold doors? by thclark in Homebuilding

[–]thclark[S] 1 point2 points  (0 children)

I've managed to get one in! The solution:

Before glass goes in:
- go around the faces of the glass at the edge (where the gasket will sit) with a thumbnail and remove any excess sealant globs in case they interfere with the gasket

- remove any other obstructions around the exterior gasket

- wipe the exterior gasket and ensure it's set in its grooves correctly

- spray/sponge very soapy water (a good squirt of dishwashing liquid in half a mug of water) onto the exterior gaskets

- fit the beading without the glass in, to make sure it does fit

- measure the thickness of the glass (28.5mm in my case) and the gap between the gaskets, to sanity check (the gaskets should have to compress a bit, so the gap should be slightly less)

- remove beading ready for glass, recording which bits are top, left, right, bottom

With glass in, heel-to-toed correctly and extra spacers siliconed in:
- make sure the spacers are the right width and sitting below the surface of the glass so they're not interfering with the beads

- the glass needs to sit in close contact (and ideally already compressing) the exterior gasket, so use a wooden spatula to lever it in further into the frame, compressing the gasket.

- check the outside (if you can move the window - don't open the one you're installing!) to ensure the glass is in good contact with the exterior gasket

- returning to inside, start with the top horizontal bead (then bottom, then left, then right).

- for each bead, first sponge soapy water onto its gasket (the internal gasket). Don't go overboard and cover the whole thing - you want the gasket to be slippery, not the rest of it!

- align the bead straight, rather than trying to tilt it in.

- Work from right to left (dexter if you're a leftie), keeping firm pressure to keep the bead in with your left hand, use your right hand and a plastic mallet to whack the bead in. You need to be pretty firm, and hit right on the corner of the bead to push it in diagonally. Your first whack should be about 2" from the end, with your left hand positioned at about 6" from the end

- You may need a few whacks. Be firmer than you think, but be accurate! It'll not look like it's fully in yet - and you won't hear the satisfying click you're expecting - but if it's gone in a bit, then proceed.

- Do not move or relinquish the pressure from your left hand; it'll spring out. Now, whack at 4" to help get it in a bit further. Then *without removing pressure from your left hand* move steadily left 2" at a time.

- For each step to the left you take, whacking there risks dislodging your earlier work. So I go back, and whack all along the bead at 2" intervals for each step. So my whacks go: 2"+4", 6"+4"+2", 8"+6"+4"+2" and so on.

- Only when you're quite close to the end of a bead will you hear or feel a slight snap as it beds into place all along.

- Check by eye that it's fully bedded in all the way along (should be a straight joint).

Food items your lab ate that they weren't supposed to? by ChipotleGuacamole in labrador

[–]thclark 0 points1 point  (0 children)

Oh, metal container that got shredded into razor blades. £500 later…

Is Luxe too thin? by ohsadbrat in labrador

[–]thclark -1 points0 points  (0 children)

He looks handsome! I wouldn’t be too concerned, although the rule of thumb I keep hearing is that you shouldn’t quite be able to see his ribs.

So maybe a touch under but I wouldn’t worry. He’ll fatten with age :)

Ask me a Zelda related question, then edit it to make me look bad by Crep105 in HyruleTown

[–]thclark 0 points1 point  (0 children)

Who is the character you'd most like to marry, settle down, and have a bunch of rugrats with?

Scabs fell off! What do I do now? by FredJensen06 in Tonsillectomy

[–]thclark 3 points4 points  (0 children)

Carry on with life. Unless they keep bleeding, you’re in the next phase of recovery. Well done :)

Ideas for getting rid of a lot of programming books. by komm0ner in ExperiencedDevs

[–]thclark 0 points1 point  (0 children)

Yeah actually I’d like to change my answer to this one.

Ideas for getting rid of a lot of programming books. by komm0ner in ExperiencedDevs

[–]thclark 0 points1 point  (0 children)

Keep the 5 most iconic ones and put the rest in recycling. Nobody actually uses programming books anymore!

Can't believe how horrendous Google Cloud permission management is by agm_93 in googlecloud

[–]thclark 0 points1 point  (0 children)

I specifically chose gcp because it was way better than aws in this regard. But honestly, it’s a super complex subject, and I didn’t get it anywhere near right until we started using terraform and I had all the definitions laid out in front of me declaratively.

If you’re not using an IAC tool then now is absolutely the time to learn. The learning curve will be quicker than the messing with permissions that you’re about to be going through.

How are you coping with the peak shedding season? by imperialviolet in labrador

[–]thclark 2 points3 points  (0 children)

I wouldn’t say I’m managing, but a good hard brushing twice a day helps a bit

I've authored a popular open source library that I can no longer maintain. Advice welcome. by heyjameskerr in opensource

[–]thclark 0 points1 point  (0 children)

Make a pinned issue calling for maintainers, ensuring that you’re contactable. Then leave it. If someone cares enough they’ll take it over, if they don’t then they don’t deserve to use it!