Commits

Ed Brannin committed c654a7e

Adding a fabfile.

Comments (0)

Files changed (1)

+from fabric.api import *
+import os
+
+def _path(file):
+    return os.path.join(os.path.dirname(env.real_fabfile), file)
+
+def manage(command, **kwargs):
+    "Run a manage.py command"
+    _env("python %s %s" % (_path("baptism_records/manage.py"), command), **kwargs)
+
+def _env(command, **kwargs):
+    kwargs.update(capture=False)
+    env_path = os.path.dirname(env.real_fabfile)
+    local(". %s/env/bin/activate && %s" % (env_path, command), **kwargs)
+
+def serve(port='8080', local_only=True):
+    # TODO: Care about the parameters
+    manage("runserver")
+    
+
+
+def requirements():
+    "Updates requirements.txt"
+
+def test():
+    print