Adding tailwindcss to Django

In this post I will describe how to add the tailwindcss framework to a Django project. The example which follows was developed on Windows 10 with VS Code, Django 3.2.9, tailwindcss 3.0.8 Start Here If you don’t have a Django project to hand, you can clone the example I will be using throughout the rest of […]

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. settings.py Add the following to the settings.py. 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 […]

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 form.save() results in an error such as: The save() method works with model forms because there is a model associated with it so […]