Skip to content

Repository files navigation

Social Media Application

Social Media Application based on the django framework and django rest api.

Run Locally

Clone the project

  git clone https://github.com/Hybridhash/Django-SocialWeb.git

Go to the project directory

  cd socialweb

Install dependencies

  poetry install

Start the server

  poetry run python manage.py runserver

Alternative procedure to run using pip

Video Link for working application

Youtube

Instructions [Enabling Tailwind & Daisy UI]

Ensure that prebuild project has already install locally with the required dependencies in a virtual envoirnment.

Enabling Tailwind

  • 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

Enabling daisyUI

  • Open a terminal, and run the following commands:
    cd jstoolchains
    npm install daisyui
  • modify your jstoolchains\tailwind.config.js
   plugins: [require("daisyui")],

voilà!! 💘

Tech Stack

Client: HTMX, TailwindCSS, DaisyUI

Server: Django, Djnago REST Framework

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages