Skip to content

TongobashV/django-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To-Do List Project A simple task management application built with Django, PostgreSQL, and Django REST Framework.

Features

View and add tasks on the website (http://127.0.0.1:8000/) REST API to list tasks (GET /api/tasks/) and create tasks (POST /api/tasks/) Admin panel to manage tasks (/admin/) API authentication with tokens for secure access Basic CSS styling for a clean user interface

Requirements

Python 3.8+ PostgreSQL Django Django REST Framework

Setup

Clone the repository: git clone https://github.com/TongobashV/django-todo.git cd django-todo

Create a virtual environment: python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

Install dependencies: pip install -r requirements.txt

Set up PostgreSQL: Create a database named todolist_db: psql -U postgres -c "CREATE DATABASE todolist_db;"

Update settings.py with your database credentials (default: user postgres, password 123456).

Run migrations: python manage.py migrate

Create a superuser: python manage.py createsuperuser

Example: Username admin, password 1234.

Start the server: python manage.py runserver

Usage

Website: http://127.0.0.1:8000/ View tasks and add new ones using the form. Admin Panel: http://127.0.0.1:8000/admin/ Log in with superuser credentials to manage tasks. API (requires authentication): Generate a token: python manage.py drf_create_token GET /api/tasks/ - List all tasks. Header: Authorization: Token POST /api/tasks/ - Create a task. Header: Same as above Body (JSON): {"title": "New Task", "completed": false}

Tech Stack

Backend: Django, Django REST Framework Database: PostgreSQL Frontend: HTML, CSS Tools: Postman for API testing

Notes

Ensure PostgreSQL is running before starting the server. The API is protected; use Postman or curl with a token for testing. Author: TongobashV (NEO)

About

Simple To-Do List app with Django and REST API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors