Detecting Near-Earth Objects using NASA's API
# Go into project directory
cd neo-detection
# Create virtual environment
python3 -m venv env
source env/bin/activate
# Install all required packages (Django, Django REST Framework, dotenv, etc.) into virtual env
pip install -r requirements.txt
# Configure environment variables (instructions below)
# Sync database and apply migrations
python manage.py migrate
# Create an admin superuser with your desired username, email and password
python manage.py createsuperuser --username admin --email [email protected]
# Run the server (default: 127.0.0.1:8000)
python manage.py runserver
Create a new .env
file in root directory and use .env.example
as a reference to provide the following environment variables:
DJANGO_SECRET_KEY=
NASA_API_KEY=
To generate a new Django secret key, run this in a Python virtual environment after dependencies have been installed.
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'