This project is a web database used for tracking public art projects. Check out the web app here.
- Flask -- Python web framework
- Flask-SQLAlchemy -- SQL database ORM
- Flask-Login -- User session management
- Flask-Migrate -- Database migrations
- Flask-WTF -- Secure form handling
- Flask-talisman -- HTTPS Security
- PostgreSQL -- Database storage
- JavaScript
This'll get you a copy of the project running on your local machine for development and testing.
👉 Python
👉 Pip
👉 Virtualenv & Virtualenvwrapper
👉 NPM
Clone the app files to your computer
$ git clone https://github.com/purwin/Parks-Database.git
$ cd Parks-Database
Create a virtual environment, then install the required app and node packages:
$ mkvirtualenv parks-db
$ pip install -r requirements.txt
$ npm install
Get a dev server up and running on http://localhost:5000
$ export FLASK_APP=run.py
$ export FLASK_ENV=development
$ flask run
To test routes and database models, run
$ python -m unittest discover -s tests
If altering any database models, run the following commands to handle migrations
$ flask db migrate
$ flask db upgrade
Parks-Database
│
├── /app/ # Web app dir
│ ├── /add_models/ # Add records to DB scripts
│ ├── forms.py # Created form classes
│ ├── model_import.py # Import route functions
│ ├── parks_db.py # Database model classes
│ ├── /static/ # Web page dir
│ │ ├── /img/ # App imgs
│ │ ├── /js/ # JS dir
│ │ │ ├── /dist/ # Bundled, minified JS files
│ │ │ └── /src/ # Source JS files
| | |
│ │ └── /style/ # [S]CSS dir
│ │ ├── /dist/ # Bundled, minified CSS files
│ │ └── /src/ # Source SASS files
│ │
│ ├── /templates/ # HTML templates
│ ├── users.py # User classes
│ └── views.py # Site routes
│
├── config.py # Environment config file
├── /migrations/ # DB migration dir
├── package-lock.json # NPM lock file
├── package.json # Node Package list
├── parks.db # Database file
├── postcss.config.js # PostCSS config file
├── Procfile # App process file
├── requirements.txt # App requirements file
├── run.py # App run file
├── runtime.txt # Python version declaration
├── /tests/ # Route/model test files
└── webpack.config.js # Webpack config file
Index
│
├── /exhibitions/ # Exhibitions landing page
│ ├── /create/ # Create new exhibition page [POST]
│ └── /#/ # Individual exhibition page
│ ├── /edit/ # Edit exhibition page [POST]
│ └── /delete/ # Delete exhibition page [GET/POST]
│
├── /parks/ # Parks landing page
│ ├── /create/ # Create new park page [POST]
│ └── /#/ # Individual park page
│ ├── /edit/ # Edit park page [POST]
│ └── /delete/ # Delete park page [GET/POST]
│
├── /artists/ # Artists landing page
│ ├── /create/ # Create new artist page [POST]
│ └── /#/ # Individual artist page
│ ├── /edit/ # Edit artist page [POST]
│ └── /delete/ # Delete artist page [GET/POST]
│
├── /artworks/ # Artworks landing page
│ ├── /create/ # Create new artwork page [POST]
│ └── /#/ # Individual artwork page
│ ├── /edit/ # Edit artwork page [POST]
│ └── /delete/ # Delete artwork page [GET/POST]
│
├── /orgs/ # Organizations landing page
│ ├── /create/ # Create new organization page [POST]
│ └── /#/ # Individual organization page
│ ├── /edit/ # Edit organization page [POST]
│ └── /delete/ # Delete organization page [GET/POST]
│
├── /import/ # Import records via CSV files
│
├── /create/ # Create a new individual record
Reach out if you're interested in helping!
This project is totally open source, licensed under the MIT License.
- NYC Open Data and its Directory of Parks