HTTP Server to store and serve data collected in flight.
pip3 install Django
From the project root dir
python3 manage.py runserver
- Create the application directory
django-admin startapp [newappname]
- Create views for application
# newappname/views.py
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(response):
return HttpResponse("Hello, world. You're at the newapp index.")
- Create url endpoints for new views
# newappname/urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
- Import url's into project
# groundstation/urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('newappname/', include('newappname.urls')),
]