Skip to content

Commit

Permalink
wait for modification
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyu committed Oct 11, 2016
1 parent 8c12825 commit d801ac7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions xadmin/plugins/export.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import StringIO
import io
import datetime
import sys

Expand Down Expand Up @@ -88,7 +88,7 @@ def _get_datas(self, context):

def get_xlsx_export(self, context):
datas = self._get_datas(context)
output = StringIO.StringIO()
output = io.StringIO()
export_header = (
self.request.GET.get('export_xlsx_header', 'off') == 'on')

Expand Down Expand Up @@ -125,7 +125,7 @@ def get_xlsx_export(self, context):

def get_xls_export(self, context):
datas = self._get_datas(context)
output = StringIO.StringIO()
output = io.StringIO()
export_header = (
self.request.GET.get('export_xls_header', 'off') == 'on')

Expand Down Expand Up @@ -197,7 +197,7 @@ def _to_xml(self, xml, data):

def get_xml_export(self, context):
results = self._get_objects(context)
stream = StringIO.StringIO()
stream = io.StringIO()

xml = SimplerXMLGenerator(stream, "utf-8")
xml.startDocument()
Expand Down
3 changes: 2 additions & 1 deletion xadmin/sites.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
from functools import update_wrapper
from future.utils import iteritems
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.base import ModelBase
Expand Down Expand Up @@ -308,7 +309,7 @@ def wrapper(*args, **kwargs):
]

# Add in each model's views.
for model, admin_class in self._registry.iteritems():
for model, admin_class in iteritems(self._registry):
view_urls = [url(
path, wrap(
self.create_model_admin_view(clz, model, admin_class)),
Expand Down
2 changes: 1 addition & 1 deletion xadmin/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def get_url(menu, had_urls):
for menu in nav_menu.values():
menu['menus'].sort(key=sortkeypicker(['order', 'title']))

nav_menu = nav_menu.values()
nav_menu = list(nav_menu.values())
nav_menu.sort(key=lambda x: x['title'])

site_menu.extend(nav_menu)
Expand Down

0 comments on commit d801ac7

Please sign in to comment.