Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Added locale option to propagate script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Wenzel committed Mar 3, 2011
1 parent 7f64b45 commit bcf781c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/feedback/cron.py
Expand Up @@ -55,7 +55,7 @@

@cronjobs.register
@transaction.commit_on_success
def populate(num_opinions=None, product='mobile', type=None):
def populate(num_opinions=None, product='mobile', type=None, locale=None):
if not num_opinions:
num_opinions = getattr(settings, 'NUM_FAKE_OPINIONS',
DEFAULT_NUM_OPINIONS)
Expand All @@ -70,7 +70,7 @@ def populate(num_opinions=None, product='mobile', type=None):
type = random.choice(TYPES).id
o = Opinion(type=type,
url=random.choice(URLS),
locale=random.choice(settings.INPUT_LANGUAGES),
locale=locale or random.choice(settings.INPUT_LANGUAGES),
user_agent=random.choice(UA_STRINGS[product]))

if type != input.OPINION_RATING.id:
Expand Down

0 comments on commit bcf781c

Please sign in to comment.