Skip to content

brmlab/brmburo

Repository files navigation

Django boilerplate

INSTALL

  • install distribuiton dependencies
apt-get install postgresql python-virtualenv python-dev python-crypto ipython python-sqlite python-psycopg2 python-yaml python-passlib
  • clone this repository and set up dependencies
git clone  
make initenv
source bin/activate
make reqs/[dev|test|prod]
  • create, import database and set up DATABASES in brmburo/settings/local.py

     from .dev import *
    
     BANK_TOKENS = [
       'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
       'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
       'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC',
       'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD',
       'EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE',
     ]
    
     DATABASES = {
         'default': {
             'ENGINE': 'django.db.backends.postgresql_psycopg2',
             'NAME': 'brmburo', 
             'USER': 'brmbureaucrat',
             'PASSWORD': 'my choosen password',
             'HOST': '127.0.0.1',
             'PORT': '',
             }
     }
    
     DOKUWIKI_USERS_FILE = '/path/to/users.auth.php' #config file where dokuwiki has login data, usually in /var/www/conf
    

you can create user and empty postgres database using:

sudo -u postgres psql <<-EOF
CREATE ROLE brmbureaucrat WITH LOGIN PASSWORD 'my choosen password';
CREATE DATABASE brmburo;
GRANT ALL PRIVILEGES ON DATABASE brmburo TO brmbureaucrat;
EOF
  

and import data from database dump if desired (data must be acquired by pg_dump first):

sudo -u postgres psql brmburo < brmburo.dump.sql
  • run setup
make setup/[dev|test|prod]
  • if you start with blank database, you must at least load static data
make load

TODO

  • Write install instructions [pborky]
  • Fix up database scheme
    • Transaction tables - splits, virtual accounts (funds, user accounts) [WIP]
      • Determine schema update [pborky]
      • Link to logical accounts from bank accounts and buddies, logical transactions from bank transactions and buddyevents [pborky or pasky]
    • Buddy event - add dates "created" and "since", date -> "until"

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •