Ephes Blog

Miscellaneous things. Not sure what to put here, yet.


TIL: Integrate Wagtail API into Local Namespace

, Jochen

I wanted to incorporate a wagtail pages endpoint into django-cast. Although I successfully added it to the global URLConf as per the official documentation, django-cast serves as a third-party library, and its API should likely exist within the cast namespace. This didn't work and I ended up always seeing an error like this:

NoReverseMatch at /cast/api/pages/
'wagtailapi' is not a registered namespace

After a significant amount of experimentation, I eventually discovered a method to successfully employ the WagtailAPIRouter in the local URLConf:

# api views.py
from wagtail.api.v2.router import WagtailAPIRouter
from wagtail.api.v2.views import PagesAPIViewSet

wagtail_api_router = WagtailAPIRouter("cast:api:wagtail")
wagtail_api_router.register_endpoint("pages", PagesAPIViewSet)

# local urls.py
app_name = "api"
urlpatterns = [
    ...,
    # wagtail api
    path("wagtail/", include((views.wagtail_api_router.get_urlpatterns(), "api"), namespace="wagtail")),
]

Here's how the pages endpoint reversal works now:

reverse("cast:api:wagtail:pages:listing")

Weeknotes 2023-02-20

, Jochen
“Raw data is both an oxymoron and a bad idea; to the contrary, data should be cooked with care.”—Geoffrey Bowker

Work, carnival, and some progress on my side projects. Finally managed to try out the cool new openpodcast stack for podcast analytics. Hmm, first I have to find a way to get it to work with postgres instead of MySQL. Looking forward to shooting some pictures again, since I forgot the charging cable for my camera two months ago and now got it back 📸.

django-cast release 0.2.6:

  • Got codecov.io to show 100% coverage (fixed the GitHub action submitting the coverage results)
  • The release of django-crispy-forms broke tests and comments and stuff -> I was able to fix it after reading the migration guide
  • Documentation for Pagination

homepage / python-podcast:

  • Tuned down traces/performance metrics for sentry
  • Fixed date facets breaking out of the form-control container for python-podcast.de

kptncook:

Articles

Software

Mastodon / Twitter

Podcasts


Weeknotes 2023-02-13

, Jochen
The logic of the world is prior to all truth and falsehood. —Ludwig Wittgenstein

Been sick for the umpteenth time this winter. Tried to do some chores on django-cast to pass the time:

  • The test coverage is now at 100% (failed to configure codecov.io to report the right number..)
  • Nearly complete type annotations, which created a bug in production (failing isinstance call which got necessary to make mypy pass)
  • Wagtail 4.2 compatibility, which led to this bug report
  • Fixed the pagination feature

Updated my self-hosted mastodon instance to 4.1, which was just a redeploy - smooth.

Articles

Software

  • Mypy 1.0 Released | And it's faster 🥳
  • SiYuan | An obsidian alternative
  • slippers - Build reusable components in Django without writing a single line of Python

Mastodon

Video

Podcasts


Weeknotes 2023-02-06

, Jochen
I am wondering what should be the color of this bikeshed? --@kushal

The usual work and usual chores. Nothing interesting here.

Finally tried out Obsidian - wow, this is a deep rabbit hole. Syncing also works with iCloud folders between iOS and macOS. It's not great but sufficient for my needs (sharing links with the daily note).

Split the blog and podcast model and released a new django-cast version.

Articles

Weeknotes

Software

Mastodon / Twitter

Podcasts


Weeknotes 2023-01-30

, Jochen
Your honor my client is no longer in their villain era --@ItsMattsLaw

At work, I had to find out that Python enums are slow when used as keys in a dict. I would never have guessed that some_enum.__hash__() is the main occupation of the software I wrote. Unfortunately, I won't attend PyConDE this year because I forgot I already bought tickets for btconf which happens on the same date 😭. And I am still not sure whether I should attend DjangoConEU 2023 or EuroPython 2023 - maybe someone is interested in trying to convince me? Also recorded a new podcast episode about PyPy which was a lot of fun. No issues with django-cast this time, all went well. Didn't even have to touch the Django admin. Closed all the issues I opened up last time.

There were also some improvements to django-cast:

Articles

Software

Events

Videos

Podcasts