Merge lp:~cjohnston/loco-team-portal/update-openids-update into lp:loco-team-portal

Proposed by Chris Johnston
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 557
Merged at revision: 556
Proposed branch: lp:~cjohnston/loco-team-portal/update-openids-update
Merge into: lp:loco-team-portal
Diff against target: 53 lines (+29/-15)
2 files modified
loco_directory/common/management/commands/update-openids.py (+29/-0)
loco_directory/teams/management/commands/update-openids.py (+0/-15)
To merge this branch: bzr merge lp:~cjohnston/loco-team-portal/update-openids-update
Reviewer Review Type Date Requested Status
Chris Johnston Needs Resubmitting
Adnane Belmadiaf Needs Fixing
Review via email: mp+112914@code.launchpad.net

Commit message

Changes update-openids to allow the importing of users by username instead of requiring that all are updated. Saves a huge amount of time

Description of the change

Changes update-openids to allow the importing of users by username instead of requiring that all are updated. Saves a huge amount of time

To post a comment you must log in.
Revision history for this message
Adnane Belmadiaf (daker) wrote :

Approve!

review: Approve
Revision history for this message
Tarmac WebDev (tarmac-webdev) wrote :

Attempt to merge into lp:loco-team-portal failed due to conflicts:

contents conflict in loco_directory/teams/management/commands/update-openids.py

551. By Adnane Belmadiaf

[r=chrisjohnston] * Fixed the common app coding style

552. By Adnane Belmadiaf

* Break up past meetings by year/month Props Ris

553. By Adnane Belmadiaf

[r=] * Removed identi.ca from the feed

554. By Adnane Belmadiaf

[r=] Fix the event layout

555. By Adnane Belmadiaf

[r=] Bumped django version to 1.1.3 since 1.1.2 is no longer available on pypi

Revision history for this message
Adnane Belmadiaf (daker) wrote :

Can you pls fix this when you have time ?

review: Needs Fixing
556. By Chris Johnston

Resolved conflict

557. By Chris Johnston

Further cleanup

Revision history for this message
Chris Johnston (cjohnston) :
review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'loco_directory/common/management/commands/update-openids.py'
2--- loco_directory/common/management/commands/update-openids.py 1970-01-01 00:00:00 +0000
3+++ loco_directory/common/management/commands/update-openids.py 2012-11-11 18:48:18 +0000
4@@ -0,0 +1,29 @@
5+#!/usr/bin/python
6+
7+import sys
8+
9+from django.core.management.base import BaseCommand, CommandError
10+from optparse import make_option
11+
12+from common import launchpad
13+from django.contrib.auth.models import User
14+
15+
16+class Command(BaseCommand):
17+ help = "Set openid identity urls from launchpad"
18+ option_list = BaseCommand.option_list + (
19+ make_option("-u", "--user", dest='user',
20+ help="Supply a user to setup the openid identity url from launchpad."),
21+ )
22+
23+ def handle(self, *args, **options):
24+ username = options['user']
25+ if not username:
26+ for user in User.objects.all():
27+ launchpad.set_user_openid(user, force=True)
28+ else:
29+ try:
30+ user = User.objects.get(username=username)
31+ except User.DoesNotExist:
32+ sys.exit('Seems that this user does not exist')
33+ launchpad.set_user_openid(user, force=True)
34
35=== removed file 'loco_directory/teams/management/commands/update-openids.py'
36--- loco_directory/teams/management/commands/update-openids.py 2012-06-01 21:00:57 +0000
37+++ loco_directory/teams/management/commands/update-openids.py 1970-01-01 00:00:00 +0000
38@@ -1,15 +0,0 @@
39-# -*- coding: utf-8 -*-
40-#!/usr/bin/python
41-
42-from django.core.management.base import NoArgsCommand
43-from django.contrib.auth.models import User
44-
45-from common import launchpad
46-
47-
48-class Command(NoArgsCommand):
49- help = "Set openid identity urls from launchpad"
50-
51- def handle_noargs(self, **options):
52- for user in User.objects.all():
53- launchpad.set_user_openid(user, force=True)

Subscribers

People subscribed via source and target branches