piovincecang

Pio Vince Cang's Dev Blog

Hello and welcome to my dev blog. Here, I write technical stuff.

Windows 10 Post-Reformat Checklist

March 5, 2022 A little how-to guide on what services to turn off after installing Windows 10 because these services are a pain in the ass and on the disk. These instructions were gathered from various sources, most...

Developing Django and React on Virtual Machine, Testing on Host Machine

January 14, 2022 This post is a little how-to guide on being able to access a site under development from a host machine as it is being built and served from inside a guest virtual machine. In my case, I run a Windows...

Django: Decorators for Permissions Checks

October 7, 2021 Role-Based Access Using Decorators Below, I go through a Python decorator which takes arguments to enforce a granular level of permission handling on Django REST Framework API Views. Why use a decorat...

Python: defaultdict

June 5, 2021 defaultdict If you're tired of encountering KeyErrors when accessing a non-existent key in a dict, and instead want to have a predefined default value returned when accessing the existent key, default...