Merge lp:~cjohnston/summit/propose-meeting-not-attendee into lp:summit

Proposed by Chris Johnston
Status: Superseded
Proposed branch: lp:~cjohnston/summit/propose-meeting-not-attendee
Merge into: lp:summit
Diff against target: 692 lines (+317/-74)
16 files modified
requirements.txt (+2/-2)
setup.py (+1/-1)
summit/common/management/commands/lpupdate.py (+24/-6)
summit/schedule/admin/attendeeadmin.py (+22/-5)
summit/schedule/admin/crewadmin.py (+6/-2)
summit/schedule/admin/leadadmin.py (+6/-2)
summit/schedule/admin/meetingadmin.py (+17/-10)
summit/schedule/admin/roomadmin.py (+11/-2)
summit/schedule/admin/summitadmin.py (+7/-12)
summit/schedule/forms.py (+2/-0)
summit/schedule/models/attendeemodel.py (+8/-5)
summit/schedule/tests/__init__.py (+1/-0)
summit/schedule/tests/propose_meeting.py (+190/-0)
summit/schedule/views.py (+11/-2)
summit/settings.py (+7/-23)
summit/ubuntu_settings.py (+2/-2)
To merge this branch: bzr merge lp:~cjohnston/summit/propose-meeting-not-attendee
Reviewer Review Type Date Requested Status
Summit Hackers Pending
Review via email: mp+153460@code.launchpad.net

This proposal has been superseded by a proposal from 2013-03-14.

Commit message

Adds support for a user to propose a meeting without first being an attendee.

To post a comment you must log in.
509. By Chris Johnston

flake8 support

510. By Chris Johnston

fixes per mhall119

511. By Chris Johnston

Fixes null issue with tests

512. By Chris Johnston

cleanup

513. By Chris Johnston

Update to trunk

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'requirements.txt'
2--- requirements.txt 2013-02-20 13:57:06 +0000
3+++ requirements.txt 2013-03-14 20:59:23 +0000
4@@ -6,8 +6,8 @@
5 # include patches applied by the package maintainers.
6 #
7
8-Django==1.3.2
9-South==0.7.3
10+Django==1.4.5
11+South==0.7.5
12 bzr>=2.4b4
13 distribute==0.6.10
14 django-openid-auth==0.4
15
16=== modified file 'setup.py'
17--- setup.py 2012-03-31 02:50:39 +0000
18+++ setup.py 2013-03-14 20:59:23 +0000
19@@ -41,7 +41,7 @@
20 packages = packages,
21 zip_safe = False,
22 install_requires = [
23- "Django==1.3.1",
24+ "Django==1.4.5",
25 "psycopg2>=2.0.9",
26 "pytz",
27 "BeautifulSoup",
28
29=== modified file 'summit/common/management/commands/lpupdate.py'
30--- summit/common/management/commands/lpupdate.py 2013-02-26 19:31:21 +0000
31+++ summit/common/management/commands/lpupdate.py 2013-03-14 20:59:23 +0000
32@@ -26,12 +26,30 @@
33
34 class Command(BaseCommand):
35 option_list = BaseCommand.option_list + (
36- make_option("-s", "--slots", dest="slots",
37- help="Number of slots an imported meeting needs", type=int, default=1),
38- make_option("-A", "--no-attendees", dest="skip_attendees", action="store_true",
39- help="Don't import Attendee data", default=False),
40- make_option("-M", "--no-meetings", dest="skip_meetings", action="store_true",
41- help="Don't import Meeting data", default=False),
42+ make_option(
43+ "-s",
44+ "--slots",
45+ dest="slots",
46+ help="Number of slots an imported meeting needs",
47+ type=int,
48+ default=1
49+ ),
50+ make_option(
51+ "-A",
52+ "--no-attendees",
53+ dest="skip_attendees",
54+ action="store_true",
55+ help="Don't import Attendee data",
56+ default=False
57+ ),
58+ make_option(
59+ "-M",
60+ "--no-meetings",
61+ dest="skip_meetings",
62+ action="store_true",
63+ help="Don't import Meeting data",
64+ default=False
65+ ),
66 )
67
68 def handle(self, summit='', *args, **options):
69
70=== modified file 'summit/schedule/admin/attendeeadmin.py'
71--- summit/schedule/admin/attendeeadmin.py 2013-02-26 19:31:21 +0000
72+++ summit/schedule/admin/attendeeadmin.py 2013-03-14 20:59:23 +0000
73@@ -31,23 +31,40 @@
74 list_display = ('summit', 'user')
75 list_display_links = ('user', )
76 list_filter = ('summit', )
77- search_fields = ('user__username', 'user__first_name', 'user__last_name',
78- 'user__email')
79+ search_fields = (
80+ 'user__username',
81+ 'user__first_name',
82+ 'user__last_name',
83+ 'user__email'
84+ )
85 inlines = (AttendeeBusyInline, )
86
87
88 class ParticipantAdmin(admin.ModelAdmin):
89 list_display = ('meeting', 'attendee', 'participation')
90 list_display_links = ('attendee', )
91- search_fields = ('attendee__user__username', 'attendee__user__first_name', 'attendee__user__last_name',
92- 'attendee__user__email', 'meeting__name', 'meeting__title')
93+ search_fields = (
94+ 'attendee__user__username',
95+ 'attendee__user__first_name',
96+ 'attendee__user__last_name',
97+ 'attendee__user__email',
98+ 'meeting__name',
99+ 'meeting__title'
100+ )
101
102 def formfield_for_foreignkey(self, db_field, request, **kwargs):
103 if db_field.name == "meeting":
104 kwargs["queryset"] = Meeting.objects.order_by('name')
105 if db_field.name == "attendee":
106 kwargs["queryset"] = Attendee.objects.order_by('user__username')
107- return super(ParticipantAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
108+ return super(
109+ ParticipantAdmin,
110+ self
111+ ).formfield_for_foreignkey(
112+ db_field,
113+ request,
114+ **kwargs
115+ )
116
117
118 admin.site.register(Attendee, AttendeeAdmin)
119
120=== modified file 'summit/schedule/admin/crewadmin.py'
121--- summit/schedule/admin/crewadmin.py 2013-02-26 19:31:21 +0000
122+++ summit/schedule/admin/crewadmin.py 2013-03-14 20:59:23 +0000
123@@ -26,7 +26,11 @@
124 list_display = ('attendee', 'date_utc')
125 list_display_links = ('attendee', 'date_utc')
126 list_filter = ('date_utc',)
127- search_fields = ('attendee__user__username', 'attendee__user__first_name',
128- 'attendee__user__last_name', 'attendee__user__email')
129+ search_fields = (
130+ 'attendee__user__username',
131+ 'attendee__user__first_name',
132+ 'attendee__user__last_name',
133+ 'attendee__user__email'
134+ )
135
136 admin.site.register(Crew, CrewAdmin)
137
138=== modified file 'summit/schedule/admin/leadadmin.py'
139--- summit/schedule/admin/leadadmin.py 2013-02-26 19:31:21 +0000
140+++ summit/schedule/admin/leadadmin.py 2013-03-14 20:59:23 +0000
141@@ -26,7 +26,11 @@
142 list_display = ('summit', 'track', 'lead')
143 list_display_links = ('summit', 'track')
144 list_filter = ('summit', 'track')
145- search_fields = ('attendee__user__username', 'attendee__user__first_name',
146- 'attendee__user__last_name', 'attendee__user__email')
147+ search_fields = (
148+ 'attendee__user__username',
149+ 'attendee__user__first_name',
150+ 'attendee__user__last_name',
151+ 'attendee__user__email'
152+ )
153
154 admin.site.register(Lead, LeadAdmin)
155
156=== modified file 'summit/schedule/admin/meetingadmin.py'
157--- summit/schedule/admin/meetingadmin.py 2013-02-26 19:31:21 +0000
158+++ summit/schedule/admin/meetingadmin.py 2013-03-14 20:59:23 +0000
159@@ -15,7 +15,6 @@
160 # along with this program. If not, see <http://www.gnu.org/licenses/>.
161
162 from django import forms
163-from django.conf import settings
164 from django.contrib import admin
165 from django.forms.util import flatatt
166 from django.utils.encoding import force_unicode
167@@ -49,20 +48,25 @@
168 model = Participant
169 template = 'admin/edit_inline/collapsed_tabular.html'
170
171- def _media(self):
172- media = super(ParticipantInline, self)._media()
173- media.add_js(('%sjs/collapse.min.js'
174- % settings.ADMIN_MEDIA_PREFIX, ))
175- return media
176- media = property(_media)
177-
178 def get_formset(self, request, obj=None, **kwargs):
179 fs = super(ParticipantInline, self).get_formset(request, obj, **kwargs)
180 if fs and obj:
181- fs = super(ParticipantInline, self).get_formset(request, obj, **kwargs)
182- fs.form.base_fields['attendee'].queryset = fs.form.base_fields['attendee'].queryset.filter(summit=obj.summit)
183+ fs = super(
184+ ParticipantInline,
185+ self
186+ ).get_formset(
187+ request,
188+ obj,
189+ **kwargs
190+ )
191+ fs.form.base_fields[
192+ 'attendee'
193+ ].queryset = fs.form.base_fields[
194+ 'attendee'
195+ ].queryset.filter(summit=obj.summit)
196 return fs
197
198+
199 class MeetingAdminForm(forms.ModelForm):
200 drafter = forms.CharField(required=False, widget=AttendeeInput)
201 assignee = forms.CharField(required=False, widget=AttendeeInput)
202@@ -131,6 +135,7 @@
203 meeting.share()
204 share.short_description = "Share Meetings (Private only)"
205
206+
207 class MeetingAdmin(admin.ModelAdmin):
208 list_display = (
209 'summit',
210@@ -175,9 +180,11 @@
211 ),
212 }),
213 ("Hangout details", {
214+ 'classes': ('collapse', ),
215 'fields': ('hangout_url', 'broadcast_url',)
216 }),
217 ("References", {
218+ 'classes': ('collapse', ),
219 'fields': (
220 'spec_url',
221 'launchpad_blueprint_id',
222
223=== modified file 'summit/schedule/admin/roomadmin.py'
224--- summit/schedule/admin/roomadmin.py 2013-02-26 19:31:21 +0000
225+++ summit/schedule/admin/roomadmin.py 2013-03-14 20:59:23 +0000
226@@ -36,8 +36,17 @@
227
228 fieldsets = (
229 (None, {
230- 'fields': ('summit', 'name', 'title', 'type', 'size', 'tracks',
231- 'icecast_url', 'irc_channel', 'has_dial_in'),
232+ 'fields': (
233+ 'summit',
234+ 'name',
235+ 'title',
236+ 'type',
237+ 'size',
238+ 'tracks',
239+ 'icecast_url',
240+ 'irc_channel',
241+ 'has_dial_in'
242+ ),
243 }),
244 ("Availability", {
245 'fields': ('start_utc', 'end_utc'),
246
247=== modified file 'summit/schedule/admin/summitadmin.py'
248--- summit/schedule/admin/summitadmin.py 2013-02-26 19:31:21 +0000
249+++ summit/schedule/admin/summitadmin.py 2013-03-14 20:59:23 +0000
250@@ -34,12 +34,10 @@
251
252 template = 'admin/edit_inline/collapsed_tabular.html'
253
254- def _media(self):
255- media = super(TrackInline, self)._media()
256- media.add_js(('%sjs/collapse.min.js'
257- % settings.ADMIN_MEDIA_PREFIX, ))
258- return media
259- media = property(_media)
260+ class Media:
261+ media_url = getattr(settings, 'STATIC_URL', '/static/')
262+ js = [media_url+'admin/js/collapse.min.js', ]
263+
264
265 class SprintInline(admin.TabularInline):
266 model = SummitSprint
267@@ -47,12 +45,9 @@
268
269 template = 'admin/edit_inline/collapsed_tabular.html'
270
271- def _media(self):
272- media = super(SprintInline, self)._media()
273- media.add_js(('%sjs/collapse.min.js'
274- % settings.ADMIN_MEDIA_PREFIX, ))
275- return media
276- media = property(_media)
277+ class Media:
278+ media_url = getattr(settings, 'STATIC_URL', '/static/')
279+ js = [media_url+'admin/js/collapse.min.js', ]
280
281
282 class SummitAdmin(admin.ModelAdmin):
283
284=== modified file 'summit/schedule/forms.py'
285--- summit/schedule/forms.py 2013-03-05 22:42:44 +0000
286+++ summit/schedule/forms.py 2013-03-14 20:59:23 +0000
287@@ -202,6 +202,7 @@
288 YOUTUBE_PAGE_URL = re.compile(r'https?:\/\/www.youtube.com\/watch\?v=(?P<youtube_id>[^&]*).*')
289 YOUTUBE_SHORT_URL = re.compile(r'https?:\/\/youtu.be\/(?P<youtube_id>[^\?]*).*')
290
291+
292 class YouTubeEmbedURL(forms.URLField):
293
294 def clean(self, value):
295@@ -218,6 +219,7 @@
296 pass
297 return value
298
299+
300 class EditMeetingHangout(forms.ModelForm, RenderableMixin):
301 class Meta:
302 model = Meeting
303
304=== modified file 'summit/schedule/models/attendeemodel.py'
305--- summit/schedule/models/attendeemodel.py 2013-02-26 19:31:21 +0000
306+++ summit/schedule/models/attendeemodel.py 2013-03-14 20:59:23 +0000
307@@ -35,8 +35,9 @@
308 class Attendee(models.Model):
309 summit = models.ForeignKey(Summit)
310 user = models.ForeignKey(User)
311- start_utc = models.DateTimeField(db_column='start',
312- verbose_name="Start (UTC)")
313+ start_utc = models.DateTimeField(
314+ db_column='start',
315+ verbose_name="Start (UTC)")
316 end_utc = models.DateTimeField(db_column='end',
317 verbose_name="End (UTC)")
318 # FIXME restrict to tracks that match summit
319@@ -112,9 +113,11 @@
320 # login; but maybe they never will (logic copied from openid auth)
321 fullname = elem.get("displayname", '')
322 if fullname:
323- if ' ' in fullname:
324- self.user.first_name, self.user.last_name \
325- = fullname.rsplit(None, 1)
326+ #if ' ' in fullname:
327+ fullname = fullname.strip()
328+ split_names = fullname.rsplit(None, 1)
329+ if len(split_names) == 2:
330+ self.user.first_name, self.user.last_name = split_names
331 self.user.first_name = self.user.first_name[:30]
332 self.user.last_name = self.user.last_name[:30]
333 else:
334
335=== modified file 'summit/schedule/tests/__init__.py'
336--- summit/schedule/tests/__init__.py 2013-02-27 03:29:31 +0000
337+++ summit/schedule/tests/__init__.py 2013-03-14 20:59:23 +0000
338@@ -30,3 +30,4 @@
339 from private_scheduling import *
340 from schedule import *
341 from summit_model import *
342+from propose_meeting import *
343
344=== added file 'summit/schedule/tests/propose_meeting.py'
345--- summit/schedule/tests/propose_meeting.py 1970-01-01 00:00:00 +0000
346+++ summit/schedule/tests/propose_meeting.py 2013-03-14 20:59:23 +0000
347@@ -0,0 +1,190 @@
348+# The Summit Scheduler web application
349+# Copyright (C) 2008 - 2013 Ubuntu Community, Canonical Ltd
350+#
351+# This program is free software: you can redistribute it and/or modify
352+# it under the terms of the GNU Affero General Public License as
353+# published by the Free Software Foundation, either version 3 of the
354+# License, or (at your option) any later version.
355+#
356+# This program is distributed in the hope that it will be useful,
357+# but WITHOUT ANY WARRANTY; without even the implied warranty of
358+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
359+# GNU Affero General Public License for more details.
360+#
361+# You should have received a copy of the GNU Affero General Public License
362+# along with this program. If not, see <http://www.gnu.org/licenses/>.
363+
364+import datetime
365+
366+from django import test as djangotest
367+from django.core.urlresolvers import reverse
368+from django.contrib.auth.models import User
369+from django.test.client import Client
370+
371+from model_mommy import mommy as factory
372+
373+from summit.schedule.models import (
374+ Summit,
375+ Slot,
376+ Attendee,
377+ Meeting,
378+ Track,
379+ Room,
380+ Lead,
381+ Participant,
382+ Agenda,
383+)
384+
385+
386+class ProposeMeetingSummitTestCase(djangotest.TestCase):
387+ """
388+ Tests for the propose meeting functions
389+ """
390+
391+ c = Client()
392+
393+ def setUp(self):
394+ now = datetime.datetime.utcnow()
395+ one_hour = datetime.timedelta(0, 3600)
396+ week = datetime.timedelta(days=5)
397+ self.summit = factory.make_one(
398+ Summit,
399+ name='uds-virt',
400+ virtual_summit=True,
401+ date_start=now,
402+ date_end=now + week,
403+ )
404+
405+ self.slot = factory.make_one(
406+ Slot,
407+ start_utc=now+one_hour,
408+ end_utc=now+(2*one_hour),
409+ type='open',
410+ summit=self.summit
411+ )
412+ self.track = factory.make_one(Track, summit=self.summit, title='test')
413+ self.room = factory.make_one(
414+ Room,
415+ summit=self.summit,
416+ type='open',
417+ irc_channel='test-channel',
418+ )
419+
420+ self.user1 = factory.make_one(
421+ User,
422+ username='testuser',
423+ first_name='Test',
424+ last_name='User',
425+ is_active=True,
426+ is_superuser=False,
427+ )
428+ self.user1.set_password('password')
429+ self.user1.save()
430+
431+ def tearDown(self):
432+ self.client.logout()
433+
434+ def login(self):
435+ logged_in = self.c.login(
436+ username='testuser',
437+ password='password')
438+ self.assertTrue(logged_in)
439+
440+ def view_and_save_propose_meeting_form(self):
441+ """
442+ Tests that a user, attendee or not, can propose a meeting
443+ """
444+ # View the edit meeting hangout form
445+ rev_args = [self.summit.name, ]
446+ response = self.c.get(
447+ reverse(
448+ 'summit.schedule.views.propose_meeting',
449+ args=rev_args
450+ )
451+ )
452+ self.assertEqual(response.status_code, 200)
453+ self.assertTemplateUsed(response, 'schedule/propose_meeting.html')
454+
455+ # Define data to fill our the form
456+ title = 'Test Meeting'
457+ description = "This is a test meeting."
458+ tracks = [self.track.pk]
459+ spec_url = "http://www.example.com/spec"
460+ wiki_url = "http://www.example.com/wiki"
461+ pad_url = "http://www.example.com/pad"
462+ csrf_token = '%s' % response.context['csrf_token']
463+ #import pdb;pdb.set_trace()
464+ # Post the form
465+ post = self.c.post(
466+ reverse(
467+ 'summit.schedule.views.propose_meeting',
468+ args=rev_args
469+ ),
470+ data={
471+ 'csrfmiddlewaretoken': csrf_token,
472+ 'title': title,
473+ 'description': description,
474+ 'tracks': tracks,
475+ 'spec_url': spec_url,
476+ 'wiki_url': wiki_url,
477+ 'pad_url': pad_url,
478+ }
479+ )
480+ #import pdb; pdb.set_trace()
481+ # A successful post should redirect to the meeting page
482+ response = self.view_meeting_page()
483+ meeting = Meeting.objects.get(title='Test Meeting')
484+ redirect_args = [self.summit.name, meeting.id, meeting.name]
485+ redirect_url = reverse(
486+ 'summit.schedule.views.meeting',
487+ args=redirect_args
488+ )
489+ self.assertEqual(post.status_code, 302)
490+ self.assertRedirects(
491+ post,
492+ redirect_url,
493+ )
494+ redirect_response = self.c.get(redirect_url)
495+
496+ # Verify that the new data appears on the meeting page
497+ self.assertEqual(redirect_response.status_code, 200)
498+ self.assertIn("Test Meeting", redirect_response.content)
499+
500+ def view_meeting_page(self):
501+ meeting = Meeting.objects.get(title='Test Meeting')
502+ rev_args = [self.summit.name, meeting.id, meeting.name]
503+ response = self.c.get(
504+ reverse(
505+ 'summit.schedule.views.meeting',
506+ args=rev_args
507+ )
508+ )
509+ self.assertEqual(response.status_code, 200)
510+
511+ return response
512+
513+ def test_propose_meeting_no_attendee(self):
514+ """
515+ Tests that a user who is not an attendee can propose a meeting
516+ and that an attendee record is created when the user does.
517+ """
518+
519+ self.login()
520+
521+ self.view_and_save_propose_meeting_form()
522+
523+ def test_propose_meeting_with_attendee(self):
524+ """
525+ Tests that a user who is not an attendee can propose a meeting
526+ and that an attendee record is created when the user does.
527+ """
528+
529+ self.attendee1 = factory.make_one(
530+ Attendee,
531+ summit=self.summit,
532+ user=self.user1,
533+ start_utc=self.summit.date_start,
534+ end_utc=self.summit.date_end
535+ )
536+
537+ self.login()
538
539=== modified file 'summit/schedule/views.py'
540--- summit/schedule/views.py 2013-03-07 22:33:12 +0000
541+++ summit/schedule/views.py 2013-03-14 20:59:23 +0000
542@@ -24,7 +24,7 @@
543 from django.core.urlresolvers import reverse
544 from django.utils.datastructures import SortedDict
545 from django.views.decorators.csrf import csrf_exempt
546-from django.views.decorators.csrf import csrf_protect
547+from django.contrib.auth.decorators import login_required
548
549 from summit.schedule.decorators import (
550 summit_required,
551@@ -716,9 +716,18 @@
552 )
553
554
555-@summit_attendee_required
556+@login_required
557+@summit_required
558 def propose_meeting(request, summit, attendee):
559
560+ if attendee is None:
561+ attendee = Attendee.objects.create(
562+ summit=summit,
563+ user=request.user,
564+ start_utc=summit.date_start,
565+ end_utc=summit.date_end,
566+ )
567+ attendee = attendee
568 meeting = Meeting(
569 summit=summit,
570 drafter=attendee,
571
572=== modified file 'summit/settings.py'
573--- summit/settings.py 2013-03-09 05:00:49 +0000
574+++ summit/settings.py 2013-03-14 20:59:23 +0000
575@@ -25,10 +25,6 @@
576
577 SERVE_STATIC = True
578
579-OPENID_STRICT_USERNAMES = True
580-OPENID_FOLLOW_RENAMES = True
581-OPENID_SREG_REQUIRED_FIELDS = ['email']
582-
583 SITE_ROOT = 'http://summit.ubuntu.com'
584
585 ADMINS = (
586@@ -55,14 +51,10 @@
587 # system time zone.
588 TIME_ZONE = 'UTC'
589
590-# Language code for this installation. All choices can be found here:
591-# http://www.i18nguy.com/unicode/language-identifiers.html
592 LANGUAGE_CODE = 'en-us'
593
594 SITE_ID = 1
595
596-# If you set this to False, Django will make some optimizations so as not
597-# to load the internationalization machinery.
598 USE_I18N = False
599
600 # Absolute path to the directory that holds media.
601@@ -80,14 +72,11 @@
602 # URL Location for static media
603 STATIC_URL = "/static/"
604
605-# Make this unique, and don't share it with anybody.
606 SECRET_KEY = ''
607
608-# List of callables that know how to import templates from various sources.
609 TEMPLATE_LOADERS = (
610 'django.template.loaders.filesystem.Loader',
611 'django.template.loaders.app_directories.Loader',
612-# 'django.template.loaders.eggs.load_template_source',
613 )
614
615 TEMPLATE_CONTEXT_PROCESSORS = (
616@@ -96,6 +85,7 @@
617 "django.core.context_processors.i18n",
618 "django.core.context_processors.media",
619 "django.core.context_processors.request",
620+ "django.contrib.messages.context_processors.messages",
621 "common.context_processors.next_summit",
622 "common.context_processors.login_redirect",
623 "common.context_processors.url_base",
624@@ -110,14 +100,12 @@
625 'django.middleware.locale.LocaleMiddleware',
626 'django.contrib.sessions.middleware.SessionMiddleware',
627 'django.contrib.auth.middleware.AuthenticationMiddleware',
628+ 'django.contrib.messages.middleware.MessageMiddleware',
629 )
630
631 ROOT_URLCONF = 'summit.urls'
632
633 TEMPLATE_DIRS = (
634- # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
635- # Always use forward slashes, even on Windows.
636- # Don't forget to use absolute paths, not relative paths.
637 os.path.join(PROJECT_PATH, 'templates'),
638 os.path.join(PROJECT_PATH, 'common/templates'),
639 )
640@@ -125,6 +113,7 @@
641 INSTALLED_APPS = [
642 'django.contrib.auth',
643 'django.contrib.contenttypes',
644+ 'django.contrib.messages',
645 'django.contrib.sessions',
646 'django_openid_auth',
647 'django.contrib.admin',
648@@ -141,18 +130,13 @@
649 'django.contrib.auth.backends.ModelBackend',
650 )
651
652-# Should users be created when new OpenIDs are used to log in?
653+# OPENID Related settings
654+OPENID_STRICT_USERNAMES = True
655+OPENID_FOLLOW_RENAMES = True
656+OPENID_SREG_REQUIRED_FIELDS = ['email']
657 OPENID_CREATE_USERS = True
658-
659-# Can we reuse existing users?
660 OPENID_REUSE_USERS = True
661-
662-# When logging in again, should we overwrite user details based on
663-# data received via Simple Registration?
664 OPENID_UPDATE_DETAILS_FROM_SREG = True
665-
666-# If set, always use this as the identity URL rather than asking the
667-# user. This only makes sense if it is a server URL.
668 OPENID_SSO_SERVER_URL = 'https://login.ubuntu.com/'
669
670 # Tell django.contrib.auth to use the OpenID signin URLs.
671
672=== modified file 'summit/ubuntu_settings.py'
673--- summit/ubuntu_settings.py 2013-02-26 22:28:51 +0000
674+++ summit/ubuntu_settings.py 2013-03-14 20:59:23 +0000
675@@ -2,7 +2,7 @@
676 import sys
677
678 from settings import *
679-
680+TRACK_DISPLAY_NAME = 'Microconf'
681 SITE_ROOT = 'http://summit.ubuntu.com'
682
683 # Google Analytics code
684@@ -14,7 +14,7 @@
685 import ubuntu_website
686
687 INSTALLED_APPS.append('ubuntu_website')
688-
689+
690 TEMPLATE_CONTEXT_PROCESSORS += (
691 "ubuntu_website.media_processor",
692 "ubuntu_website.popup_check",

Subscribers

People subscribed via source and target branches