pandafy@dev-logs:~$

  • Deferred Fields in Django

    Django’s ORM provides a way to load only specific fields from the database using only and defer methods. The deferred fields are represented with the django.db.models.base.DEFERRED object. refresh_from_db model loads the deferred fields from the database, but it is possible to make it load only specific fields. While working on...

  • Closing Issues is Therapeutic

    This week started pretty slow. I was getting blocked in OpenWISP again and again. It was just by the end of the week when work started to pace through. I was relieved with the Selenium tests PR getting merged. Making those tests work consistently on CI was a huge pain,...

  • Writing tests using Selenium

    I have been working on relevant templates features of openwisp-controller on-and-off for the last couple of months. The goal is to only show templates that can be applied to the device. Every time I made an improvement, something broke. Being implemented in JavaScript, it didn’t have any automated tests and...

  • Authentication using SAML

    Last week I worked on adding support for registration using SAML in openwisp-radius. It had to look it up as I only heard about SAML and never worked with it. I found multiple modules for adding SAML support to a Django project, out of them djangosaml2 stood out. djangosaml2 is...

  • Generating queries in PSQL

    I was interacting today with a Postgres server where I needed to change the owner of all of the tables of a database. An answer on StackOverflow suggested the following code which transfers ownership of call of the public tables. SELECT 'ALTER TABLE '|| schemaname || '."' || tablename ||'"...