Skip to content

shemarlindie/django-api

Repository files navigation

A Django-powered API

Includes various utility apps / endpoints.

Demos

These web apps provide a frontend to the APIs in this project.

User -- demo : Gir@ff3s

Overview

Project Structure

  • django_api/api - API apps
  • django_api/modules - Regular apps
  • django_api/utils - Utils app

Requirements

Setup

  1. Install dependencies

pipenv install

  1. Open Pipenv shell

pipenv shell

  1. Run migrations

python manage.py migrate

  1. Create superuser

python manage.py createsuperuser

Follow the prompts to create an admin user.

  1. Load fixture data (optional)

python manage.py loaddata issue/all

This will load dummy data for the issue module. It includes:

  • Users
  • Issue metadata records (tags, types, statuses, etc)
  • Projects
  • Issues

python manage.py loaddata skill/skills

This will load dummy data for the skill module. It includes:

  • Skills

Run

python manage.py runserver

Try:

API Authentication

{
    "expiry": "2021-09-07T20:51:49.354313-04:00",
    "token": "<auth token>",
    "user": {
        "id": 1,
        "username": "user",
        "email": "user@example.com",
        "first_name": "Example",
        "last_name": "User",
        "last_login": "2021-09-06T20:51:49.356207-04:00",
        "is_active": true,
        "date_joined": "2021-09-06T18:07:32-04:00",
        "is_staff": true,
        "is_superuser": true
    }
}

Use <auth token> with the Authorization header on subsequent request like this:

Authorization: Token <auth token>

About

A Django-powered API with various utility apps / endpoints.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages