- Paul Owe
- Reem Aleithan
A Flask application for displaying location-based open education resources using google maps API. The resources used to instantiate the map are based on environmental scans conducted by two junior research assistants working on a FSL platform for promoting bilingualism and 21st century competencies.
$ git clone https://github.com/paulowe/maps4resources.git
$ cd maps4resources
$ pip install virtualenv
$ virtualenv -p python3 venv
$ source venv/bin/activate
(If you're on a mac) Make sure xcode tools are installed
$ xcode-select --install
$ pip install -r requirements.txt
You need to install Foreman and Redis. Chances are, these commands will work:
$ gem install foreman
For Mac (using homebrew):
$ brew install redis
For Linux (Fedora)
$ sudo dnf install redis
For Linux (Debian/Ubuntu):
$ sudo apt-get install redis-server
If you don't want to install redis locally, you can use Redis container with docker
$ docker pull redis:latest
$ docker run -d -p 6379:6379 --name maps4all-redis redis:latest
Create a .env
file in your directory and include the following variables:
ADMIN_EMAIL
andADMIN_PASSWORD
allow you to login as an administrator to Maps4Resources on your local machine.FILEPICKER_API_KEY
is an API key which you can obtain here.MAIL_PASSWORD
andMAIL_USERNAME
are your login credentials for Sendgrid.GOOGLE_API_KEY
,GOOGLE_API_1
, andGOOGLE_API_2
are API keys for Google maps. They can be obtained here.TWILIO_ACCOUNT_SID
andTWILIO_AUTH_TOKEN
allow you to use the Twilio API to send text messages. They can be obtained through the Twilio console.
Your .env
file should look something like this:
ADMIN_EMAIL=admin@my.yorku.ca
ADMIN_PASSWORD=password123
FILEPICKER_API_KEY=XXXXXXXXXXXXXXXX
MAIL_USERNAME=liambekirsky
MAIL_PASSWORD=password123
GOOGLE_API_KEY=XXXXXXXXXXXXXXXX
GOOGLE_API_1=XXXXXXXXXXXXXXXX
GOOGLE_API_2=XXXXXXXXXXXXXXXX
TWILIO_ACCOUNT_SID=XXXXXXXXXXXXXXXX
TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXX
$ python manage.py recreate_db
$ python manage.py setup_dev
$ python manage.py add_fake_data
$ source venv/bin/activate
$ honcho start -f Local
Then navigate to http://localhost:5000
on your preferred browser to open the web app.
├── Procfile
├── README.md
├── app
│ ├── __init__.py
│ ├── account
│ │ ├── __init__.py
│ │ ├── forms.py
│ │ └── views.py
│ ├── admin
│ │ ├── __init__.py
│ │ ├── forms.py
│ │ └── views.py
│ ├── assets
│ │ ├── scripts
│ │ │ ├── app.js
│ │ │ └── vendor
│ │ │ ├── jquery.min.js
│ │ │ ├── semantic.min.js
│ │ │ └── tablesort.min.js
│ │ └── styles
│ │ ├── app.scss
│ │ └── vendor
│ │ └── semantic.min.css
│ ├── assets.py
│ ├── decorators.py
│ ├── email.py
│ ├── main
│ │ ├── __init__.py
│ │ ├── errors.py
│ │ ├── forms.py
│ │ └── views.py
│ ├── models.py
│ ├── static
│ │ ├── fonts
│ │ │ └── vendor
│ │ ├── images
│ │ └── styles
│ │ └── app.css
│ ├── templates
│ │ ├── account
│ │ │ ├── email
│ │ │ ├── login.html
│ │ │ ├── manage.html
│ │ │ ├── register.html
│ │ │ ├── reset_password.html
│ │ │ └── unconfirmed.html
│ │ ├── admin
│ │ │ ├── index.html
│ │ │ ├── manage_user.html
│ │ │ ├── new_user.html
│ │ │ └── registered_users.html
│ │ ├── errors
│ │ ├── layouts
│ │ │ └── base.html
│ │ ├── macros
│ │ │ ├── form_macros.html
│ │ │ └── nav_macros.html
│ │ ├── main
│ │ │ └── index.html
│ │ └── partials
│ │ ├── _flashes.html
│ │ └── _head.html
│ └── utils.py
├── config.py
├── manage.py
├── requirements
│ ├── common.txt
│ └── dev.txt
└── tests
├── test_basics.py
└── test_user_model.py