Pull requirements from pip so we get later things on CentOS 6, etc

This commit is contained in:
Michael DeHaan 2013-03-13 16:06:19 -04:00
parent e47c2fe08f
commit b97193e6a0
4 changed files with 18 additions and 18 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
lib/settings.py
env/*
*.py[c,o]
*.swp

View File

@ -4,10 +4,15 @@ clean:
rebase:
git pull --rebase origin master
push:
git push
zero:
# go back to original database state, be careful!
python manage.py migrate main zero
setup:
# use ansible to ansible ansible commander locally
ansible-playbook app_setup/setup.yml --verbose -i "127.0.0.1," -c local -e working_dir=`pwd`
syncdb:
@ -20,8 +25,8 @@ runserver:
# already done and should not have to happen again:
#
south_init:
python manage.py schemamigration main --initial
#south_init:
# python manage.py schemamigration main --initial
dbchange:
# run this each time we make changes to the model

View File

@ -6,25 +6,22 @@
# TODO: setup celery and any worker processes/requirements
- hosts: 127.0.0.1
gather_facts: True
gather_facts: False
user: root
vars_files:
- vars/vars.yml
tasks:
- name: install packages
action: yum name=$item state=installed
with_items:
- postgresql # database client
- postgresql-server # database server
- Django # web stack
- Django-south # migration support
- python-django-tastypie # rest support
- python-psycopg2
with_name:
- postgresql # database client
- postgresql-server # database server
- python-psycopg2 # database library
# the following could probably be included, though ident identification is fiddly
# so we won't use it to create the database and database user
- name: install python modules
pip: requirements=${working_dir}/requirements.txt
- name: configure the database authentication more or less open for setup
template: src=templates/pg_hba_low.j2 dest=/var/lib/pgsql/data/pg_hba.conf
@ -52,9 +49,6 @@
- name: configure python settings (with database password)
template: src=templates/settings.py.j2 dest=${working_dir}/lib/settings.py
#- name: sync Django database
# shell: python ${working_dir}/manage.py syncdb
- name: sync django database
django_manage: >
command=syncdb

View File

@ -6,8 +6,8 @@ from django.db import models
# TODO: audit cascade behavior and defaults
# TODO: set related names
# SET_NULL = models.SET_NULL
# PROTECT = models.PROTECT
SET_NULL = models.SET_NULL
PROTECT = models.PROTECT
class CommonModel(models.Model):
'''