Category Archives: Programming

Displaying data with dynamic accordion

By | November 12, 2023

If you want to have an accordion feature to show extra data where you are displaying data from a database on an existing row, you need create set some extra attributes on the first row. One important attribute is data-target which needs to contain a dynamic value such as This then points to the second… Read More »

Thumbnail bug in python simple gallery

By | November 8, 2023

Python simple gallery is pretty neat but there is an issue when generating thumbnails if your photos are named a certain way. The filename is split at the first dot and then .jpg is added to the file name. My photos are named: 2023-09-24 19.00.43.jpg which means everything after the hour is truncated. ie the… Read More »

Update your Django db model

By | May 12, 2023

If you have changed your database schema, you can up date your model by first running the inspectdb command. If you have too many tables in your database, pipe the results to a temporary file first and then manually copy the models over. Then run: ref: https://dev.to/idrisrampurawala/creating-django-models-of-an-existing-db-288m

Useful command lines to know

By | March 20, 2023

Secure Copy scp [file on your computer] [destination host]:[folder] PIP JSON viewer https://jsonlint.com/ One way to traverse YouTube is [header][c4TabbedHeaderRenderer][subscriberCountText][accessibility][accessibilityData][label] However, an easier way is to use a helper site.