Django Logging with VS Code

Rather than rehash the excellent official documentation on Django Logging I will demonstrate how you can add logging to an existing Django project. Add the following to the This is an example based on one used in the documentation and I have found it easier to understand by starting at the bottom. root […]

VS Code: Screencast Mode

VS Code has a Screencast mode which highlights the cursor position and outputs the keystrokes which can be useful for demos or presentations. Originally introduced in VS Code 1.31 It has been enhanced in VS Code 1.63. Turning on Screencast Open the command palette (Windows & macOS: F1) and type: toggle screencast mode With screencast […]

Python: Where has pip installed that package?

To locate a package installed using pip the show command can be used. pip show The show command displays useful information about the package, amongst which is the location or path to where the package was installed. The format of the command is: pip show package_name To find where pip installed the requests package, at […]

Django: object has no attribute ‘save’

When using model forms you can save values entered into a form by calling the form’s save() method as shown below. If you are not using model forms an attempt to call results in an error such as: The save() method works with model forms because there is a model associated with it so […]