naclonts / mylocalmarket

App to find local farmers markets

Home Page:https://nathanclonts.com/mylocalmarket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My Local Market

A web application to help people find local farmers markets.

Uses Django to load data from government sources, then serves it dynamically with AJAX based on zipcode searches.

Build

To build, clone this repo and install dependencies:

pip install -r requirements.txt
npm install

Build the JavaScript files with this script (uses Babel with webpack to convert the ECMAScript6 to 'VanillaJS'):

npm run build:dev

MyLocalMarket is set up to use PostgreSQL. Create a database named mylocalmarket, then create a user with all privileges. Add a file named secret_settings.py in the directory mylocalmarket/settings and define the username, password, and a Django key. An example of secret_settings.py in a test/debug environment could look like this:

# Private info on database superuser to be used by Django
DATABASE_USER = 'my_admin_user'
DATABASE_PASSWORD = 'awesome_password!'

DJANGO_SECRET_KEY = '$$$$$*h@7a_m*)beciv=en5@5m4(@$@=g_=$$$$$'

Run migrations:

python manage.py makemigrations
python manage.py migrate

Run the update-markets custom Django command, which loads market data from the CSV into our Postgres database:

python manage.py update-markets

About

App to find local farmers markets

https://nathanclonts.com/mylocalmarket


Languages

Language:Python 50.6%Language:HTML 22.5%Language:CSS 15.3%Language:JavaScript 9.6%Language:Vue 2.0%