Social Media Application based on the django framework and django rest api.
Clone the project
git clone https://github.com/Hybridhash/Django-SocialWeb.gitGo to the project directory
cd socialwebInstall dependencies
poetry installStart the server
poetry run python manage.py runserverAlternative procedure to run using pip
Ensure that prebuild project has already install locally with the required dependencies in a virtual envoirnment.
- Create a new directory within your Django project, in which you'll install tailwindCSS like in any vanilla JS project setup:
mkdir jstoolchains
cd jstoolchains
npm init -y
npm install -D tailwindcss
npx tailwindcss init- Configure your template paths in tailwind.config.js that have just been created by adding below in a file. jstoolchains/tailwind.config.js
content: ["../**/templates/**/*.html"],- In "upper/root folder", create an input.css and add below dependencies
@tailwind base;
@tailwind components;
@tailwind utilities;- In your package.json file, prepare npm scripts to ease execution of tasks (adapt the paths according to your Django static folder location): jstoolchains\package.json
"scripts": {
"tailwind-watch": "tailwindcss -i ../input.css -o ../blogApp/static/css/output.css --watch",
"tailwind-build": "tailwindcss -i ../input.css -o ../blogApp/static/css/output.css --minify"
},
- In the tag of your base.html add:
<link rel="stylesheet" href="{% static "css/output.css" %}">- Test it
cd jstoolchains
npm run tailwind-watch- Open a terminal, and run the following commands:
cd jstoolchains
npm install daisyui- modify your jstoolchains\tailwind.config.js
plugins: [require("daisyui")],voilà!! 💘
Client: HTMX, TailwindCSS, DaisyUI
Server: Django, Djnago REST Framework