Skip to content

lorainemg/django-rest-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django REST Tutorial

This repository contains a simple project that follows the official Django REST Framework tutorial. It's intended as a learning resource to understand the fundamentals of building APIs using Django and the Django REST Framework (DRF).

Features

  • Django project setup with REST framework integration
  • Basic CRUD API for code snippets
  • Token-based authentication
  • Permissions and ownership logic
  • DRF's browsable API for interactive exploration

Project Structure

django-rest-tutorial/ 
├── manage.py 
├── snippets/ # Contains models, serializers, views, URLs 
├── tutorial/ # Project settings and configuration 
└── requirements.txt

Getting Started

To get the project up and running locally:

  1. Clone the repository
git clone https://github.com/lorainemg/django-rest-tutorial.git
cd django-rest-tutorial
  1. Create and activate a virtual environment
python -m venv env
source env/bin/activate  # On Windows: env\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Apply migrations
python manage.py migrate
  1. Create a superuser (optional)
python manage.py createsuperuser
  1. Run the development server
python manage.py runserver

Access the API at: http://localhost:8000/

Useful Links

About

Tutorial to Teach Myself Django Rest Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages