Skip to content

rosscdh/glynt

Repository files navigation

The Glynt Project

LawPal is platform that aims to make certain legal process simpler and give both the client and the lawyer a clear overview of what has and what is yet to be done.

Read more topics at: http://discourse.lawpal.com

The platform can be described as:

Every user of LawPal.com has a:

"user" account
which has a "client" profile

a "user" can be a
"customer"
who has 1 "company"

OR a "user" can be a
"lawyer"
who has 1 "firm"

a "customer" can create 1 or more
"project"(s) each project has 1 or more "transact"(ions)
each "transact"(ion) has many "todo" items
the "project" has 1 "lawyer" (or more ?tbd) assigned to it

Basic Installation

  1. easy_install pip
  2. pip install virtualenv virtualenvwrapper
  3. Perform these steps
export WORKON_HOME=~/.virtualenvs
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bash_profile
  1. mkvirtualenv --no-site-packages glynt

  2. mkdir -p ~/Projects

  3. cd ~/Projects

  4. git clone git@github.com:rosscdh/glynt.git

  5. cd glynt

  6. pip install -r requirements.txt : install update the required libraries (append --upgrade if you are not sure)

  7. fab rebuild_local : will perform the following steps automatically:

    1. ````cp conf/dev.local_settings.py glynt/local_settings.py```
    2. python manage.py syncdb : sync the database; and create the default user if there is not already one
    3. python manage.py migrate : perform the rest of the migrations
    4. python manage.py loaddata sites cities_light transact
    5. python manage.py check_permissions # Creates the userena permissions
    6. Thats it you can now python manage.py runserver_plus
    7. access http://local.weareml.com:8000/ (you may need to add 127.0.0.1 local.weareml.com to your /etc/hosts file)

Update requirments

  1. pip install --upgrade pip - ensure latest version
  2. pip install -r requirements.txt : install update the required libraries (append --upgrade if you are not sure)

Webhook Callbacks - Crocdoc

  1. install https://ngrok.com
  2. run ngrok 127.0.0.1:8000
  3. this will give you a url like: http://19b51bbe.ngrok.com
  4. register this url at the crocdoc url: https://crocodoc.com/settings/webhook/
  5. in the form: http://19b51bbe.ngrok.com/crocdoc/webhook/
  6. interact with an uploaded crocdoc item attachment

Notes

The following sections are simply notes and are not necessary for getting running in dev.

Start Celery Worker

Only run the celery worker if you want to test async processes

python manage.py celery worker --loglevel=info

Geos

Not necessary for dev.local

brew install geos

Cities

Not necessary for dev.local

Load all the city data

manage.py cities_light --force-all

Creating Fixtures

** Document Templates **

./manage.py dumpdata document.documenttemplate > glynt/apps/document/fixtures/documenttemplate.json ./manage.py dumpdata lawyer auth > public/fixtures/lawyers.json ./manage.py dumpdata firm deal endorsement > public/fixtures/legal.json

Model Graphs

./manage.py graph_models -g -o ~/Desktop/glynt-models.png firm lawyer deal endorsement auth

Markdown

  1. For a complete overview of markdown: http://stackoverflow.com/editing-help
  2. Install html2text to convert html to Markdown (pip install html2text)

Docs

  1. found in the /docs folder

EC2 Account signin

https://562971026743.signin.aws.amazon.com/console/ec2

Deployment

Valid environemnts are: staging|preview|production

export TARGET_ENV='staging'
fab $TARGET_ENV deploy assets
fab $TARGET_ENV requirements clean_pyc syncdb migrate

CasperJS && PhantomJS

OSX

Should be >= casperjs: 1.1.0-DEV Should be >= phantomjs: 1.9.0

  1. brew update
  2. brew install phantomjs
  3. brew install casperjs --devel

UBUNTU

  1. sudo apt-get install libxml2-dev libxslt1-dev