A Django-based web application for displaying and analyzing Quality of Life (QOL) survey data across different towns and demographics. Link to website: www.agpolicyiowastate.org
- Interactive data visualization of QOL metrics
- Search functionality for towns
- Demographic filtering
- Multi-year comparison capabilities
- Python 3.9+
- Django 4.2
- MySQL 8+
- HTML/CSS/JavaScript
- Bootstrap for UI
- Python 3.9 or higher
- MySQL 8.0 or higher
- pip (Python package manager)
- virtualenv (recommended)
-
Clone the repository:
git clone <repository-url> cd Django\ App -
Create and activate a virtual environment:
python -m venv virt source virt/bin/activate # On Windows, use `virt\Scripts\activate` -
Install dependencies:
pip install -r requirements.txt -
Set up environment variables: Create a
.envfile in theISTP_websitedirectory with the following variables:DJANGO_SECRET_KEY=your_secret_key DJANGO_DEBUG=True DB_NAME=ISTP_SCHEMA DB_HOST=127.0.0.1 DB_PORT=3306 DB_USER=your_db_user DB_PASSWORD=your_db_password ALLOWED_HOSTS=localhost,127.0.0.1 -
Run migrations:
cd ISTP_website python manage.py migrate -
Start the development server:
python manage.py runserver
Run the test suite with:
python manage.py test webapp
-
Sign up for a PythonAnywhere account
-
Upload your code:
- Via Git:
git pushto a repository, then clone on PythonAnywhere - Via direct upload: Upload files through PythonAnywhere dashboard
- Via Git:
-
Create a virtualenv on PythonAnywhere and install requirements
-
Configure the web app in PythonAnywhere:
- Set the WSGI configuration file to point to your project's wsgi.py
- Configure static files
- Set up environment variables
-
Set up MySQL database on PythonAnywhere
-
Run migrations and populate the database
Detailed deployment instructions can be found in the deployment documentation.
ISTP_website/- Main Django project directorywebapp/- Main application with views, models, and templatesstatic/- Static files (CSS, JS, images)logs/- Application logs
[Your License Information]
[Your Contact Information]