Skip to content
Snippets Groups Projects
Commit bb9781a7 authored by Ben Adida's avatar Ben Adida
Browse files

fixed utf-8 issue in twitter share parameters, continued work on fabric deployment file

parent 0e65e4aa
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,14 @@ def checkout_tag(tag, path):
if result.failed:
abort("on remote: could not check out tag %s" % tag)
result = run('git submodule init')
if result.failed:
abort("on remote: could not init submodules")
result = run('git submodule update')
if result.failed:
abort("on remote: could not update submodules")
def migrate_db(path):
with cd(path):
result = run('python manage.py migrate')
......@@ -56,12 +64,17 @@ def restart_apache():
if result.failed:
abort("could not restart apache")
def restart_celeryd():
result = sudo('/etc/init.d/celeryd restart')
if result.failed:
abort("could not restart celeryd")
def deploy(tag, path):
confirm("Ready to deploy %s to %s?" % (tag,path))
run_tests()
check_tag(tag, path=path)
checkout_tag(tag, path=path)
#migrate_db(path=path)
migrate_db(path=path)
restart_apache()
def staging_deploy(tag):
......@@ -69,3 +82,4 @@ def staging_deploy(tag):
def production_deploy(tag):
deploy(tag, path=PRODUCTION_DIR)
restart_celeryd()
......@@ -221,13 +221,13 @@ def one_election_view(request, election):
# status update message?
if election.openreg:
if election.voting_has_started:
status_update_message = "Vote in %s" % election.name
status_update_message = u"Vote in %s" % election.name
else:
status_update_message = "Register to vote in %s" % election.name
status_update_message = u"Register to vote in %s" % election.name
# result!
if election.result:
status_update_message = "Results are in for %s" % election.name
status_update_message = u"Results are in for %s" % election.name
# a URL for the social buttons
socialbuttons_url = None
......@@ -236,7 +236,7 @@ def one_election_view(request, election):
reverse(socialbuttons),
urllib.urlencode({
'url' : election_url,
'text': status_update_message
'text': status_update_message.encode('utf-8')
}))
trustees = Trustee.get_by_election(election)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment