A Django Python Web Application featuring interactive charts for visualizing public data about Earth's atmosphere.
The program may be used to generate the following examples in the interactive web application:
In order to setup the application, Python 3.11.8 and MySQL server 8.0.36.0 must be installed.
Once Python and MySQL are installed, open a Terminal in Linux or MacOS, or a PowerShell Terminal in Windows. For installing PowerShell on Windows, it is recommended for new users to follow the instructions for "Installing the MSI package" as the installer is the easiest to use.
Now, we must generate the MySQL database used by this application as defined in settings.py
. Begin by opening the MySql command line. In MacOS or Linux, this may be done my running the following command in the terminal:mysql
In Windows, search for and run the MySQL Command Line Client.
Now we need to create a user and database and grant privileges on that database to the user. Run the following MySQL commands:
CREATE USER 'EarthTracker'@'localhost' IDENTIFIED BY '$Earth$7685Tracker$';
CREATE DATABASE EarthTrackerLive;
GRANT ALL PRIVILEGES ON EarthTrackerLive.* TO 'EarthTracker'@'localhost';
exit
Now we are ready to install and run the Django Python Web Application.
Navigate to the location where the Django application is saved, and install the Python packages in the requirements.txt file by running the following command:
pip install -r requirements.txt
Next, migrate changes the MySQL database (Note: If you are having trouble with these commands, try using python3
instead of python
in your command):
python manage.py makemigrations
python manage.py migrate
Finally, collect static files for deployment and run the server:
python manage.py collectstatic
python manage.py runserver
The Web Application may now be accessed via your browser at http://127.0.0.1:8000/