Skip to content

Commit

Permalink
suggestion of importdata function
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmrm committed Feb 10, 2015
1 parent 17f379a commit 84a0d11
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'


def reset():
"""
Reset local debug env.
Expand All @@ -31,6 +32,7 @@ def setup():
local("python setup.py install")
reset()


def deploy():
"""
Deploy project to Gastos Abertos server
Expand All @@ -43,6 +45,17 @@ def deploy():
run("python setup.py install")
run("touch wsgi.py")


def importdata(lines_per_insert=100):
"""
Import data to the local DB
"""

local("python utils/import_revenue_codes.py")
local("python utils/import_revenue.py data/receitas_min.csv %s"
% lines_per_insert)


def d():
"""
Debug.
Expand Down

0 comments on commit 84a0d11

Please sign in to comment.