whereclauses.append("NOT EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id)")
elif request.GET['author'] == '-3':
# Checking for "yourself" requires the user to be logged in!
- if not request.user.is_authenticated():
+ if not request.user.is_authenticated:
return HttpResponseRedirect('%s?next=%s' % (settings.LOGIN_URL, request.path))
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(self)s)")
whereparams['self'] = request.user.id
whereclauses.append("NOT EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id)")
elif request.GET['reviewer'] == '-3':
# Checking for "yourself" requires the user to be logged in!
- if not request.user.is_authenticated():
+ if not request.user.is_authenticated:
return HttpResponseRedirect('%s?next=%s' % (settings.LOGIN_URL, request.path))
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id AND cpr.user_id=%(self)s)")
whereparams['self'] = request.user.id
# XXX: this creates a session, so find a smarter way. Probably handle
# it in the callback and just ask the user then?
- if request.user.is_authenticated():
+ if request.user.is_authenticated:
committer = [c for c in committers if c.user == request.user]
if len(committer) > 0:
is_committer = True
class ThreadPickWidget(TextInput):
- def render(self, name, value, attrs=None):
+ def render(self, name, value, attrs=None, renderer=None):
attrs['class'] += ' threadpick-input'
html = super(ThreadPickWidget, self).render(name, value, attrs)
html = html + ' <button class="btn btn-default attachThreadButton" id="btn_%s">Find thread</button>' % name
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'REALLYCHANGETHISINLOCAL_SETTINGS.PY'
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
# url(r'^admin/doc/', include('django.contrib.admindocs.urls)),
# Uncomment the next line to enable the admin:
- url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', admin.site.urls),
]