About Dev

Dev django python unit-testing

Model fixtures loading using django-pytest

While switching from unittest to pytest on a Django projects, dealing with models' fixture in a simple way could become challenging.

Dev ssg hugo

Photo gallery automation

Hugo is an amazing Static Site Generator (SSG) written in Go allowing any dev or tech enthusiast to easily generate rich websites / blogs without struggling with any CMS. Before digging into this section, I would recommend that you take a look at Hugo's quick start

It should be as easy …

Dev shell sh

Associative arrays in non-bash shells

Bash 4 introduced the ability to declare and deal with associative arrays in a very pythonistic way, like so:

declare -A some_array        # create the array
some_array[key] = 1          # put value
echo ${some_array[key]}      # get value 

Hooray! However, depending on the context, bash 4 or even older bash …

Dev django classes python

Combine **Class Based Views** without mixing them

One of the down sides of Django's Class Based Views (CBV) I have experienced is that CBV tend to lock views on templates and drive the developer to conceive all interactions on the same page / view. Because of all the shortcuts inherited by TemplateView, for a while, I struggled designing …

Page 1 / 1