Tailwind CSS is a utility-first CSS framework and we will be using it to design the pages of our CampusConnect website. The detailed configuration of Tailwind can be viewed by clicking here.
To use tailwind, you would need to install it first, which can be done by the following command.
pip install django-tailwind
After installing tailwind, it needs to be added inside the INSTALLED_APPS
in settings.py
file.
'tailwind',
After this, tailwind should be initialized and the corresponding tailwind app name also needs to be included inside the INSTALLED_APPS
in settings.py
file.
python manage.py tailwind init
'theme',
Now you should continue to register the theme app and specify the internal ips in the settings.py
file along with configuring the path of npm in your system.
TAILWIND_APP_NAME = 'theme'
INTERNAL_IPS = [
"127.0.0.1",
]
NPM_BIN_PATH = r"C:\Program Files\nodejs\npm.cmd"
After doing these changes, you can run the tailwind install command to download the tailwind css dependencies inside your project.
python manage.py tailwind install
Now tailwind is configured in our project, and is ready to use.