Skip to content

Commit f67aa10

Browse files
committed
Updates for django 2.2
1 parent 29dce1f commit f67aa10

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

pgcommitfest/commitfest/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def commitfest(request, cfid):
127127
whereclauses.append("NOT EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id)")
128128
elif request.GET['author'] == '-3':
129129
# Checking for "yourself" requires the user to be logged in!
130-
if not request.user.is_authenticated():
130+
if not request.user.is_authenticated:
131131
return HttpResponseRedirect('%s?next=%s' % (settings.LOGIN_URL, request.path))
132132
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(self)s)")
133133
whereparams['self'] = request.user.id
@@ -144,7 +144,7 @@ def commitfest(request, cfid):
144144
whereclauses.append("NOT EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id)")
145145
elif request.GET['reviewer'] == '-3':
146146
# Checking for "yourself" requires the user to be logged in!
147-
if not request.user.is_authenticated():
147+
if not request.user.is_authenticated:
148148
return HttpResponseRedirect('%s?next=%s' % (settings.LOGIN_URL, request.path))
149149
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id AND cpr.user_id=%(self)s)")
150150
whereparams['self'] = request.user.id
@@ -261,7 +261,7 @@ def patch(request, cfid, patchid):
261261

262262
# XXX: this creates a session, so find a smarter way. Probably handle
263263
# it in the callback and just ask the user then?
264-
if request.user.is_authenticated():
264+
if request.user.is_authenticated:
265265
committer = [c for c in committers if c.user == request.user]
266266
if len(committer) > 0:
267267
is_committer = True

pgcommitfest/commitfest/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
class ThreadPickWidget(TextInput):
6-
def render(self, name, value, attrs=None):
6+
def render(self, name, value, attrs=None, renderer=None):
77
attrs['class'] += ' threadpick-input'
88
html = super(ThreadPickWidget, self).render(name, value, attrs)
99
html = html + '&nbsp;<button class="btn btn-default attachThreadButton" id="btn_%s">Find thread</button>' % name

pgcommitfest/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
# Make this unique, and don't share it with anybody.
8787
SECRET_KEY = 'REALLYCHANGETHISINLOCAL_SETTINGS.PY'
8888

89-
MIDDLEWARE_CLASSES = (
89+
MIDDLEWARE = (
9090
'django.middleware.common.CommonMiddleware',
9191
'django.contrib.sessions.middleware.SessionMiddleware',
9292
'django.middleware.csrf.CsrfViewMiddleware',

pgcommitfest/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@
5454
# url(r'^admin/doc/', include('django.contrib.admindocs.urls)),
5555

5656
# Uncomment the next line to enable the admin:
57-
url(r'^admin/', include(admin.site.urls)),
57+
url(r'^admin/', admin.site.urls),
5858
]

0 commit comments

Comments
 (0)