Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 3.16 KB

README.md

File metadata and controls

63 lines (51 loc) · 3.16 KB

digitech-website-2022

An interactive map of John McGlashan College, made for NCEA Web Design and Development Standards 91891, 91893 and 91897.

Features

Fully functional search bar with clickable markers

Searchbar

Backend access with Flask-Admin

Flask admin panel

Dark and light mode

Dark and light themes

Setup

Setting up MySQL

  1. Download and install MySQL Community Server.
  2. Launch the server.
  3. Log in to MySQL (mysql -u root -p or sudo mysql, depending on your system).
  4. Set up a user with the neccessary permissions. This user will be used by the webapp to connect to the database.
CREATE USER 'joebloggs'@'localhost' IDENTIFIED BY 'password';
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'joebloggs'@'localhost' WITH GRANT OPTION;
  1. Load the example database.
CREATE DATABASE classroom_db;

Exit mysql and run this in your shell.

mysql -u USERNAME -p classroom_db < mysql/classroom_db_dump.sql

Setting up the webapp

  1. Install all required packages with pip install -r requirements.txt. It is recommended that you do this in a virtual environment.
  2. Run setup.py to set both the webapp username & password (for the admin panel), and the MySQL username & password that you set up in the first section.
  3. You can now run the webapp with flask run.

Disclaimer

Keep in mind that this is a development server, and you should not use it in a production deployment. For more information on deploying, read the flask deployment instructions.
Furthermore, OpenStreetMap's tile server has certain limitations, and in a production deployment, you should host your own tile server.

Licensing

The source code of this project (excluding external packages and software) is licensed under the GNU GPL v3.0 license.

External software used

External packages used