buckyroberts/Vataxia
소개
Open source social network built with Django and Django REST framework
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Overview
Vataxia is an open source social network built with Django and Django REST framework. This project is the backend REST API only. The frontend is written in React and can be found here:
Project Setup
Install required packages:
pip3 install -r requirements/local.txt
Initialize database:
python3 manage.py makemigrations
python3 manage.py migrate
Fixtures
To load in sample data for all tables at once:
bash scripts/load_sample_data.sh
For Windows users:
python manage.py loaddata v1\accounts\fixtures\user.json
This will create an initial superuser account with the following credentials:
[email protected]
pass1234
Authentication
To login, send a POST request to /login with the data:
- password
On success, user information and API token will be returned:
{
"id": 1,
"email": "[email protected]",
"first_name": "Bucky",
"last_name": "Roberts",
"profile": {
"id": 2,
"image": "/media/bucky_256.png",
"user": 1
},
"role": "administrator",
"token": "cb810da7d03b85335ea18babf3536fbf2a31ccdf"
}
All subsequent API requests must include this token in the HTTP header for user identification.
Header key will be Authorization with value of 'Token' followed by a single space and then token string:
Authorization: Token 753da61b4c39bd195782710c82fe3c3b1e7f7428
API Documentation
To view API documentation, run development server and visit http://127.0.0.1:8000/docs/
Links
관련 프로젝트 살펴보기
불러오는 중…