@FunkyBob@chaos.social avatar

FunkyBob

@FunkyBob@chaos.social

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

FunkyBob, to vscode
@FunkyBob@chaos.social avatar

Can anyone recommend a plugin that does actual validation and rendering?

I've tried 5 so far and half don't work, the others produce spurious errors :/

(and one even bogged down my whole machine, even when no openapi docs were open)

ShaulaEvans, to random
@ShaulaEvans@zirk.us avatar

A friend of mine with small children is trying to get out of an abusive relationship.

I would like to point her at good resources about digital security in her situation.

If anyone has expertise in this field who can give me solid recommendations, I would appreciate it very much.

*Yes, I'm aware of Widows 11 / Recall.

*I do not need uninformed opinions or speculation from anyone and especially not from men. Thank you for your reading comprehension.

FunkyBob,
@FunkyBob@chaos.social avatar
FunkyBob, to random
@FunkyBob@chaos.social avatar

It's nice I get notified when someone edits a post I've favorited/boosted... but how do I see what was changed?

FunkyBob,
@FunkyBob@chaos.social avatar

@bitprophet Ah, I see I can click on the "Edited <timestamp>" and it shows a list of versions. Now it just needs a diff :)

FunkyBob,
@FunkyBob@chaos.social avatar

@bitprophet So @rixx ... what can I do to help make this a feature here? :)

FunkyBob, to python
@FunkyBob@chaos.social avatar

Today in my code I used:

result = [
term
for item in sequence
if (term := item.do_something()) != None
]

I found it less ugly than the alternative:

result = list(filter(None, [item.do_something() for item in sequence]))

Though I'm not entirely convinced it's easier to reason about.

FunkyBob, to random
@FunkyBob@chaos.social avatar

Nothing tells you MS Teams is not for developer teams more than their text entry box not supporting common code formatting shortcuts, like keyword or code block

FunkyBob,
@FunkyBob@chaos.social avatar

@markush Just went to re-test.

word actually did just work. (v2 on chromium)

this does not.  
webology, to random
@webology@mastodon.social avatar

Has anyone else noticed that some READMEs on GitHub have been broken recently?

I thought it was just me, but the pattern seems to be like code blocks in rst files no longer get formatted.

FunkyBob,
@FunkyBob@chaos.social avatar

@webology Someone on IRC pointed this out.

It seems to ONLY be code blocks, in RsT, with a language specified.

https://github.com/orgs/community/discussions/113792

FunkyBob,
@FunkyBob@chaos.social avatar

@webology There's two layers to the issue, at least.

One is they're rendering each line in the codeblock with a <a>

Second is their CSS doesn't distinguish between &lt;a href=&gt; and &lt;a id=&gt; so all anchors are underlined, instead of only links.

Admittedly, use of <a> as an anchor, not a link, is considered archaic in HTML terms.

carlton, to django
@carlton@fosstodon.org avatar

django-template-partials v24.2 is now available on PyPI.

$ pip install -U django-template-partials

Fixes an issue that showed up in v24.1, so you can skip that one if you didn’t get to it yet. 😉

https://pypi.org/project/django-template-partials/

FunkyBob,
@FunkyBob@chaos.social avatar

@carlton Yikes... another clone of another of my projects.

I need to get better at marketing :/

FunkyBob,
@FunkyBob@chaos.social avatar

@carlton After this, and another that's very close to django-classy-settings, it's clear there are some common problems people need to solve.

FunkyBob,
@FunkyBob@chaos.social avatar

@carlton
For a long time the standing policy in Django was just that - do it in a 3rd party package if it can be; Ever since we started evicting packages from contrib.

I always felt one strength of sniplates (my partials package) was it could use any {% block %} as a partial... this way you could partially render a full template, which I expect would appeal to the HTMx crowd.

FunkyBob,
@FunkyBob@chaos.social avatar

@carlton Migrations is a great example of something that's been an overall benefit by moving it into core -- it brought along SO much more than only migrations.

In my years of support sniplates, I think it could be far less brittle if it (or something akin) were worked into core properly...

FunkyBob, to random
@FunkyBob@chaos.social avatar

I keep getting entomology and etymology mixed up, and it bugs me beyond words!

FunkyBob, to random
@FunkyBob@chaos.social avatar

Remember folks -- a "+" IS a valid character in an email mailbox name.

STOP WRITING VALIDATORS THAT WILL NOT ACCEPT THIS!

lacey, to random
@lacey@hachyderm.io avatar

Has anyone used django-streamfield? It's working great but I am trying to write a test and I keep getting something like:

AttributeError: 'list' object has no attribute 'add'

when I try to add the streamfield block to the streamfield field in the test. My syntax is the same as the docs: https://github.com/raagin/django-streamfield/blob/master/README.md#add-block-programarly

FunkyBob,
@FunkyBob@chaos.social avatar

@lacey I've only use StreamField built into Wagtail, which doesn't use models.

Looking at the implementation, it's a JSONField with list as the default:
https://github.com/raagin/django-streamfield/blob/master/streamfield/fields.py#L70

but later wants to turn it into a StreamObject, which has an add method:
https://github.com/raagin/django-streamfield/blob/master/streamfield/base.py#L140

So my guess is your test creates the Stream with a list of members, then tries to access it immediately, whereas the StreamObject.add method will only be available after save and reload.

https://github.com/raagin/django-streamfield/blob/master/streamfield/fields.py#L82

FunkyBob, to django
@FunkyBob@chaos.social avatar

Hey friends... when authoring a reusable app, what's your BCP for setting up tests?

A dummy django project?

Something else?

pytest and pytest-django are already in the picture, if that helps.

FunkyBob, to random
@FunkyBob@chaos.social avatar

I find myself once again running into the "use UUIDv4 for PKs ... for security!" discussion.

I'm just not convinced it's buying us anything.

Has anyone got a link that will persuade me?

FunkyBob,
@FunkyBob@chaos.social avatar

@webology Specific random-key algorithm aside...

The only arguments I can recall were:

  1. enumeration attacks" -- defeated by even the most basic of authorisation filtering
  2. information leakage -- I'm not sure knowing roughly how many clients we have is a big issue, tbqh.
FunkyBob,
@FunkyBob@chaos.social avatar

I fear "Use UUID4s because security" has now become "just how we do it", and nobody can recall the arguments behind it any more.

FunkyBob, to random
@FunkyBob@chaos.social avatar

OH:
A: Valentines day tomorrow! Love is in the air!
B: No, that's pollen.

webology, to random
@webology@mastodon.social avatar

The Django apps I actually use (rough cut): https://micro.webology.dev/2024/02/04/the-django-apps.html

FunkyBob,
@FunkyBob@chaos.social avatar

@webology OK, that had some new (to me) and some surprising entries!

django-template-partials appears to be a competitor to sniplates I was unaware of.

Did not expect to see django-allauth on that list.

FunkyBob,
@FunkyBob@chaos.social avatar

@kfdm @webology That's the one I tend to recommend.

Over the years on IRC, I see a lot of people using allauth for misled reasons -- a surprising number just to get password reset!

Also there seem to be some design choices in it that make customising it difficult. At least, that's what I've garnered from helping people with it.

FunkyBob,
@FunkyBob@chaos.social avatar

@kfdm @webology

Yeah, python-social-auth seems very well engineered, but has a steeper learning curve to get started.

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