コード例 #1
0
 def save(self):
     from microblogging.utils import get_twitter_password
     update_other_services(
         self.user,
         twitter_user=self.cleaned_data["username"],
         twitter_password=get_twitter_password(
             settings.SECRET_KEY, self.cleaned_data["password"]),
     )
コード例 #2
0
def generate():
    for user in User.objects.all():
        account, created = Account.objects.get_or_create(
            user=user,
            defaults=dict(
                timezone=random.choice(COMMON_TIMEZONE_CHOICES)[0],
                language=random.choice(settings.LANGUAGES)[0],
            ),
        )
        update_other_services(user, **dict(blogrss=random.choice(RSS_FEEDS), ))
        print "Created User Account: %s" % (account, )
コード例 #3
0
ファイル: gen_account.py プロジェクト: LittleForker/pinax
def generate():
    for user in User.objects.all():
        account, created = Account.objects.get_or_create(user = user,
            defaults=dict(
                timezone = random.choice(COMMON_TIMEZONE_CHOICES)[0],
                language = random.choice(settings.LANGUAGES)[0],
            ),
        )
        update_other_services(user, **dict(
            blogrss=random.choice(RSS_FEEDS),
        ))
        print "Created User Account: %s" % (account,)
コード例 #4
0
ファイル: forms.py プロジェクト: codeflow/pinax
 def save(self):
     from microblogging.utils import get_twitter_password
     update_other_services(self.user,
         twitter_user = self.cleaned_data["username"],
         twitter_password = get_twitter_password(settings.SECRET_KEY, self.cleaned_data["password"]),
     )