目录

kraksat-server

Configuration

Requirements

  • Python 3.5

Installing

pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser

For running the server on production, copy kraksat_server/settings/production.py.example to production.py, modify as needed and then use:

export DJANGO_SETTINGS_MODULE=kraksat_server.settings.production

Before running any manage.py command.

Running

python manage.py runserver

Unit Testing

python manage.py test

Usage

Authentication

We use token-based authentication as described in Django REST Framework docs. Basically, an Authorization HTTP header is needed for every “non-safe” or “write” requests (i.e. all but GET, OPTIONS and HEAD), like so:

Authorization: Token 28619272344753805f6f6724c8c6f0d7ea5aeb42

A token for a particular user can be obtained using /token-auth/ API endpoint:

$ curl -X POST http://127.0.0.1:8000/token-auth/ -d "username=test&password=test"
{"token":"28619272344753805f6f6724c8c6f0d7ea5aeb42"}
关于

KrakSat(SMOG-P 立方星团队)地面站服务端,负责数据存储与分发。镜像收录自 https://github.com/KrakSat-2016/kraksat-server,License:MIT

102.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号