Mercurial > public > sg101
comparison gcalendar/admin.py @ 1028:5ba2508939f7
Django 1.8 changes; first batch.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 15 Dec 2015 21:01:07 -0600 |
parents | 4aadaf3bc234 |
children |
comparison
equal
deleted
inserted
replaced
1027:cd4db27c90e3 | 1028:5ba2508939f7 |
---|---|
1 """ | 1 """ |
2 This file contains the automatic admin site definitions for the gcalendar application. | 2 This file contains the automatic admin site definitions for the gcalendar application. |
3 | 3 |
4 """ | 4 """ |
5 from django.conf import settings | 5 from django.conf import settings |
6 from django.conf.urls import patterns, url | 6 from django.conf.urls import url |
7 from django.contrib import admin | 7 from django.contrib import admin |
8 from django.contrib import messages | 8 from django.contrib import messages |
9 from django.contrib.sites.models import Site | 9 from django.contrib.sites.models import Site |
10 from django.core.urlresolvers import reverse | 10 from django.core.urlresolvers import reverse |
11 from django.http import HttpResponseRedirect | 11 from django.http import HttpResponseRedirect |
35 Event.DEL_REQ: Event.DEL_APRV, | 35 Event.DEL_REQ: Event.DEL_APRV, |
36 } | 36 } |
37 | 37 |
38 def get_urls(self): | 38 def get_urls(self): |
39 urls = super(EventAdmin, self).get_urls() | 39 urls = super(EventAdmin, self).get_urls() |
40 my_urls = patterns('', | 40 my_urls = [ |
41 url(r'^google_sync/$', | 41 url(r'^google_sync/$', |
42 self.admin_site.admin_view(self.google_sync), | 42 self.admin_site.admin_view(self.google_sync), |
43 name="gcalendar-google_sync"), | 43 name="gcalendar-google_sync"), |
44 url(r'^authorize/$', | 44 url(r'^authorize/$', |
45 self.admin_site.admin_view(self.authorize), | 45 self.admin_site.admin_view(self.authorize), |
46 name="gcalendar-authorize"), | 46 name="gcalendar-authorize"), |
47 url(r'^auth_return/$', | 47 url(r'^auth_return/$', |
48 self.admin_site.admin_view(self.auth_return), | 48 self.admin_site.admin_view(self.auth_return), |
49 name="gcalendar-auth_return"), | 49 name="gcalendar-auth_return"), |
50 ) | 50 ] |
51 return my_urls + urls | 51 return my_urls + urls |
52 | 52 |
53 def approve_events(self, request, qs): | 53 def approve_events(self, request, qs): |
54 """ | 54 """ |
55 Ratchets the selected events forward to the approved state. | 55 Ratchets the selected events forward to the approved state. |