Skip to content

Commit

Permalink
fix version compare bug
Browse files Browse the repository at this point in the history
  • Loading branch information
idalin committed Jun 7, 2017
1 parent 4ec77d6 commit 868590b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Empty file added .vscode/temp.sql
Empty file.
3 changes: 2 additions & 1 deletion xadmin/plugins/xversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def get(self, request, *args, **kwargs):

return TemplateResponse(
request, self.recover_list_template or self.get_template_list(
"views/recover_list.html"), context)
"views/recover_list.html"),
context)


class RevisionListView(BaseReversionView):
Expand Down
2 changes: 1 addition & 1 deletion xadmin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
except ImportError:
from django.utils.timezone import localtime as tz_localtime

if django.get_version() < '1.11':
if django.VERSION < (1, 11):
DJANGO_11 = False
else:
DJANGO_11 = True
Expand Down
2 changes: 1 addition & 1 deletion xadmin/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def __init__(self, request, *args, **kwargs):
self.request = request
self.request_method = request.method.lower()
self.user = request.user
self.request.current_app = self.admin_site.name

self.base_plugins = [p(self) for p in getattr(self,
"plugin_classes", [])]

Expand Down

0 comments on commit 868590b

Please sign in to comment.