Get the list of all the models and associated fields/attributes in a django project or an application
Django Blog DevLog: Load Frontmatter data into Template/Model Form Fields
Rendering frontatter from content field into the Template Form field using HTMX and frontmatter libraries
Django + HTMX CRUD application
Introduction
Gone are the days of writing Ajax requests with javascript, just add a few parameters to the HTML content tags and you will be ready for sending requests to your backend. So, we are going back in time and correcting the way we think of APIs and client/server-side rendering. We are referring to the Hypermedia model for levering the server-side processing of data. Let’s get our feets wet with this ancient but revolutionary methodology of development with HTMX.
Golang: Anonymous Functions
Introduction
We have looked at the defer keyword in golang in the previous part of the series, in this section, we will understand how we can use anonymous functions in golang. We will explore how to declare and use anonymous functions with a few examples.
What are Anonymous Functions
Anonymous functions are quite simple to understand, we don’t define a function, we declare it and call it instantly. An anonymous function doesn’t have a name so hence it is called an anonymous function. As a normal function it can take in parameters and return values. With anonymous functions, we can bind the operations to a variable or a constant as a literal(value). If an anonymous function takes in a parameter, it needs to be parsed immediately after the end of the function body. We will see how we define the syntax and specifications of the anonymous functions in golang.
Deploying Django Project with Railway Nixpacks
Introduction
We have seen how to deploy a Django application on railway app in the previous article of the series. We deployed the django project using the Heroku Buildpacks under the hood. The railway app provides a couple of options on how to build your web application. Currently, there are three options, one of which is the heroku buildpacks which is the default one, second, we have the nixpacks which we will see today, and the third is the Paketo buildpack.
Map Vimscript Keymaps to Lua with a single function
Takeout the vimscript keymaps into lua with a single function call in Neovim
Configure Neovim in Lua
Introduction
It has been a while since I have written a Vim article. Finally, I got some ideas after configuring my Neovim setup for Lua. I recently migrated to Ubuntu a couple of months back and it has been a cool change from Windows 7!
In this article, we’ll see how you can set up neovim for Lua. Since Neovim 0.5, it supports lua out of the box, so in the recent release 0.7, it added more native support to lua making it a lot easier to configure and play with neovim. So, we will see how we can use lua to convert all the 200 liner vimscript into lua (We can even have packages and modules:) We will cover how to configure your keymaps, pull up all the plugins, vim options, and other customizations.
Golang: Defer
Introduction
In this part of the series, we will be taking a look at the defer keyword in golang. The defer keyword is used for delaying the function call in a particular block of program(function or a loop).
Defer Keyword
The defer keyword is an interesting keyword in golang, it basically holds up the execution of the statement until all the statements around the local scope has been executed. It is basically like a stack holding the execution of statements. You can have multiple defer keywords in the single code block(function or a loop), those will be called by the principle of first in last out.
Golang: String Manipulation
Introduction
In the 15th post of the Series, we will be looking into the details of the String manipulation and performing types of operations in Golang. We will explore string manipulation, concatenation, helper functions, etc. which will help in working with strings in Golang.
String Concatenation
String Concatenation refers to the combining and formatting of strings in Golang. We can combine multiple strings and formating the way we display the strings in Golang. We have a few ways and functions to concatenate strings in Golang.
DJ Notes
A simple note app with core django and postgres