From 32c6f7c03458629f02f92fa32bf71e7a3c3a44a2 Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Tue, 30 Apr 2013 08:36:46 -0400 Subject: [PATCH] Fixed unicode support for title context variable in sort view. Updated version to 1.4.5.1 Updated README. --- README.md | 6 ++---- adminsortable/__init__.py | 8 +++++--- adminsortable/admin.py | 17 +---------------- sample_project/database/test_project.sqlite | Bin 67584 -> 68608 bytes 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 1f526cb..c78629d 100644 --- a/README.md +++ b/README.md @@ -203,10 +203,8 @@ ordering on top of that just seemed a little much in my opinion. django-admin-sortable is currently used in production. -### What's new in 1.4.5? -- Support for queryset overrides! -- More efficient JavaScript in sortables -- Fixed highlight effect for stacked inlines on sort finish +### What's new in 1.4.5.1? +- Fixed unicode support in sort view title. ### Future diff --git a/adminsortable/__init__.py b/adminsortable/__init__.py index a5df678..37297d6 100755 --- a/adminsortable/__init__.py +++ b/adminsortable/__init__.py @@ -1,11 +1,13 @@ -VERSION = (1, 4, 5) # following PEP 386 +VERSION = (1, 4, 5, 1) # following PEP 386 DEV_N = None def get_version(): - version = "%s.%s" % (VERSION[0], VERSION[1]) + version = '{0}.{1}'.format(VERSION[0], VERSION[1]) if VERSION[2]: - version = "%s.%s" % (version, VERSION[2]) + version = '{0}.{1}'.format(version, VERSION[2]) + if VERSION[3]: + version = '{0}.{1}'.format(version, VERSION[3]) return version diff --git a/adminsortable/admin.py b/adminsortable/admin.py index 032cfb0..77b5682 100644 --- a/adminsortable/admin.py +++ b/adminsortable/admin.py @@ -69,21 +69,6 @@ class SortableAdmin(SortableAdminBase, ModelAdmin): break return sortable_foreign_key - # def __init__(self, *args, **kwargs): - # super(SortableAdmin, self).__init__(*args, **kwargs) - - # self.has_sortable_tabular_inlines = False - # self.has_sortable_stacked_inlines = False - # for klass in self.inlines: - # print type(klass) - # is_sortable = get_is_sortable( - # klass.model._default_manager.get_query_set()) - # print is_sortable - # if issubclass(klass, SortableTabularInline) and is_sortable: - # self.has_sortable_tabular_inlines = True - # if issubclass(klass, SortableStackedInline) and is_sortable: - # self.has_sortable_stacked_inlines = True - def get_urls(self): urls = super(SortableAdmin, self).get_urls() admin_urls = patterns('', @@ -158,7 +143,7 @@ class SortableAdmin(SortableAdminBase, ModelAdmin): verbose_name_plural = opts.verbose_name_plural context = { - 'title': 'Drag and drop {0} to change display order'.format( + 'title': u'Drag and drop {0} to change display order'.format( capfirst(verbose_name_plural)), 'opts': opts, 'app_label': opts.app_label, diff --git a/sample_project/database/test_project.sqlite b/sample_project/database/test_project.sqlite index 6629776a5cadda4b28afec0b1e19471b2fde4238..975e9136d8349662b846f3ba6726e1302908024e 100644 GIT binary patch delta 371 zcmZpez|t^-Wr8&88U_Xi=ZOmTjB7R~B$x{s8z>kWSs9yJ8C&X^8<|^}m~FmfZY03X z#QY7YkinVxH}mGin5j&g6<9(U#m)JEVrJ}I%##?{nYJ)6{bTlE&Sl!Nna^hlld1}{ zFJqRWc}i7odPYg2Wm0*iNkx8PX`*SmSzfVWv1LiRNh<&5n||85BJ9lS49tg^A2Kgy zZedPkc4Jm&=GZLA@|kI}R=uW>3Dij@26{#oW~N4#{F~kCGX)r#CvWK2Vr1HUyI)O$ zALtMk=2r~Nub96uzi0jh)P03nl$rTG11nIRlaYyqnURy3m6;K!{^x2A9gxGB8KoJR zxtIij)MP=GRK``41zDDDuDfw{H(rBrH+JrG+F<; N&*b+v3I#D-4FKlBVZHzW delta 258 zcmZpe!O}2+Wr8&8A_fKqr-=&ojEgoVB$x{sStuA7Ss9yJ8JX)Dm|GZ`m~XyhZY03P z$ow0qkine!_hvz!_soI}X6#(dlNi{TZZa_aWA