Skip to content

A Django REST Framework Event Management API with authentication, permissions, versioned API, and full CRUD.

Notifications You must be signed in to change notification settings

mopy7/event-management-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Event Management API (Django REST Framework)

A clean, versioned, production-style Event Management API built with Django REST Framework.
This project demonstrates authentication, permissions, CRUD operations, custom user access rules, and a professional API structure.


πŸš€ Features

πŸ” Authentication

  • Token Authentication
  • Register API
  • Login API

πŸ‘₯ User Management

  • Secure password hashing
  • Unique username & email
  • Token generation on login

πŸ“¦ Event Management

  • Create, Read, Update, Delete (CRUD)
  • Each event is owned by the user who created it
  • Automatic owner assignment
  • Timestamp tracking (created_at, updated_at)

πŸ”’ Permissions

  • Public access for GET requests
  • Authenticated access for create/update/delete
  • Custom permission: Only owner can modify or delete their events (IsOwner)

🧩 Tech Stack

  • Python 3.12.3
  • Django 5.2
  • Django REST Framework
  • DRF Token Authentication

πŸ“ Project Structure

core/
β”‚
β”œβ”€β”€ manage.py
β”‚
β”œβ”€β”€ core/                          # Project settings
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ asgi.py
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   └── wsgi.py
β”‚
β”œβ”€β”€ events/                        # App containing Event model
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ admin.py
β”‚   β”œβ”€β”€ apps.py
β”‚   β”œβ”€β”€ migrations/
β”‚   β”‚   └── 0001_initial.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ tests.py
β”‚   └── views.py   (empty/not used)
β”‚
└── api/
    └── v1/
        └── events/
            β”œβ”€β”€ __init__.py
            β”œβ”€β”€ serializers.py
            β”œβ”€β”€ views.py
            β”œβ”€β”€ urls.py
            └── permissions.py

πŸ“Œ API Endpoints

πŸ” Authentication

Method Endpoint Description
POST /api/v1/events/register/ Register new user
POST /api/v1/events/login/ Login & get token

πŸ“¦ Event CRUD

Method Endpoint Auth Description
GET /api/v1/events/ ❌ List all events
POST /api/v1/events/ βœ”οΈ Create event (owner auto)
GET /api/v1/events// ❌ Retrieve event
PUT /api/v1/events// βœ”οΈ Update event (owner only)
PATCH /api/v1/events// βœ”οΈ Partial update
DELETE /api/v1/events// βœ”οΈ Delete (owner only)

πŸ› οΈ Installation

git clone <your-repo-url>
pip install -r requirements.txt
cd src/core
python manage.py makemigrations
python manage.py migrate
python manage.py runserver

About

A Django REST Framework Event Management API with authentication, permissions, versioned API, and full CRUD.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages