Experiment with Hy, Flask, and Postgres. #incomplete #notserious
Go to file
Elf M. Sternberg bd0adf19ab [feat] The ability to get a list of all allocated appointments and office hours is up.
TODO: Add *this users* appointments to the list of appointments provided in the given
      time range.

Then: add/update/delete appointments.
2016-02-08 20:14:24 -08:00
notes [doc] Adding Django-Appointments to things I've considered. 2016-02-08 15:19:34 -08:00
.gitignore Init. 2016-02-07 11:15:39 -08:00
LICENSE Doin' the Github Thing. 2016-02-08 15:12:09 -08:00
Makefile Everything works except callproc. Nothing gets saved on callproc. Why? 2016-02-07 18:37:34 -08:00
README.md [doc] Blocking out the second code example. 2016-02-08 15:14:12 -08:00
main.hy [feat] The ability to get a list of all allocated appointments and office hours is up. 2016-02-08 20:14:24 -08:00
officehours.sql [feat] The ability to get a list of all allocated appointments and office hours is up. 2016-02-08 20:14:24 -08:00
play.hy A few updates. 2016-02-08 15:09:08 -08:00

README.md

officehours

A small experiment with Flask/Hy/Postgres. Doesn't do much yet.

Initialization

Start with initializing the virtual environment and Postgres

# From the project directory:
$ virtualenv venv
$ . ./venv/bin/activate
$ pip install hy psycopg2 flask
$ sudo -u postgres psql postgres
> CREATE DATABASE officehours;
> CREATE USER officehours;
> ALTER USER officehours WITH UNENCRYPTED PASSWORD '<password>';
> ALTER USER officehours LOGIN;
> GRANT ALL PRIVILEGES ON DATABASE officehours TO officehours;
> \CONNECT officehours;
> CREATE EXTENSION citext; 
> CREATE EXTENSION btree_gist; 
> CREATE EXTENSION plv8; 
> ^d

Current functionality is demonstrated with:

$ psql -h localhost -U officehours -d officehours -f officehours.sql
$ hy play.hy