~ronnie.vd.c/ubuntu-elections/port-to-django-1-1

« back to all changes in this revision

Viewing changes to ubuntu_voting/common/launchpad.py

  • Committer: Sense Hofstede
  • Date: 2011-04-02 15:41:46 UTC
  • Revision ID: sense@ubuntu.com-20110402154146-2ai8ot0km3dmenv9
Added localisation support, begin with making suitable for general use, moved a few variables to local_settings for greater securty, made hashing stricter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
from launchpadlib.launchpad import Launchpad
4
4
 
5
 
from ubuntu_nl_voting.settings import PROJECT_PATH
 
5
from ubuntu_voting.settings import PROJECT_PATH, SITE_PUBLIC_ID
6
6
 
7
7
cachedir = os.path.join(PROJECT_PATH, 'lp_cache')
8
8
if not os.path.isdir(cachedir):
9
9
    os.mkdir(cachedir)
10
10
 
11
11
# Getting a connection to Launchpad anonymously
12
 
lp = Launchpad.login_anonymously('ubuntu-nl-voting', 'production', cachedir)
 
12
lp = Launchpad.login_anonymously(SITE_PUBLIC_ID, 'production', cachedir)