Skip to content

A Django template pre-configured with Django Ninja, Ninja JWT, and Django Unfold.

License

Notifications You must be signed in to change notification settings

hrmasss/django-ninja-unfold

Repository files navigation

Django Ninja Unfold Template

A Django template pre-configured with Django Ninja, Ninja JWT, and Django Unfold for rapid API development with JWT authentication and a modern admin interface.

Features

  • Django Integration: Pre-configured with essential Django settings and utilities.
  • Django Ninja: Ready for building APIs with Django Ninja.
  • Ninja JWT Authentication: Implements JWT authentication using Ninja JWT.
  • Django Unfold: Includes Django Unfold for a visually appealing and functional admin panel.

Requirements

  • Python 3.12 or higher
  • Django 5.1 or higher
  • Django Ninja
  • Django Ninja JWT
  • django-unfold
  • Tailwind CSS

Project Structure

project/
├── core/                   # Django project config
│   ├── settings.py
│   ├── urls.py
│   └── ...
├── users/                  # Authentication and users
│   └── ...
├── common/                 # Shared logic and resources
│   └── ...
├── logs/                   # Application logs
├── .env.example
├── .gitignore
├── manage.py
├── pyproject.toml
├── poetry.lock
├── README.md
└── requirements.txt

Setup Instructions

Using Poetry

  1. Install Poetry: If you haven't already, install Poetry by following the instructions on the Poetry website.

  2. Clone the Repository:

    git clone https://github.com/hrmasss/django-ninja-unfold.git project-name
    cd project-name
  3. Install Dependencies:

    poetry install
  4. Activate the Virtual Environment:

    poetry shell
  5. Configure Environment Variables: Copy .env.example to .env:

    cp .env.example .env

    Then, populate the .env file with the necessary environment variables (e.g., database URL, secret keys, API keys).

  6. Run Migrations:

    python manage.py migrate
  7. Create a Superuser:

    python manage.py createsuperuser
  8. Start the Development Server:

    python manage.py runserver

Using Python venv

  1. Clone the Repository:

    git clone https://github.com/hrmasss/django-ninja-unfold.git project-name
    cd project-name
  2. Create a Virtual Environment:

    python -m venv .venv
  3. Activate the Virtual Environment:

    • On Windows:

      .venv\Scripts\activate
    • On macOS and Linux:

      source .venv/bin/activate
  4. Install Dependencies:

    pip install -r requirements.txt
  5. Configure Environment Variables: Copy .env.example to .env:

    cp .env.example .env

    Then, populate the .env file with the necessary environment variables (e.g., database URL, secret keys, API keys).

  6. Run Migrations:

    python manage.py migrate
  7. Create a Superuser:

    python manage.py createsuperuser
  8. Start the Development Server:

    python manage.py runserver

About

A Django template pre-configured with Django Ninja, Ninja JWT, and Django Unfold.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages