Don’t use unique timestamp for GPS model
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:
kraksat_server/settings/production.py.example
production.py
export DJANGO_SETTINGS_MODULE=kraksat_server.settings.production
Before running any manage.py command.
python manage.py runserver
python manage.py test
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
GET
OPTIONS
HEAD
Authorization: Token 28619272344753805f6f6724c8c6f0d7ea5aeb42
A token for a particular user can be obtained using /token-auth/ API endpoint:
/token-auth/
$ 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
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
kraksat-server
Configuration
Requirements
Installing
For running the server on production, copy
kraksat_server/settings/production.py.exampletoproduction.py, modify as needed and then use:Before running any manage.py command.
Running
Unit Testing
Usage
Authentication
We use token-based authentication as described in Django REST Framework docs. Basically, an
AuthorizationHTTP header is needed for every “non-safe” or “write” requests (i.e. all butGET,OPTIONSandHEAD), like so:A token for a particular user can be obtained using
/token-auth/API endpoint: