Brandon Taylor
d4f577fdf9
Update csrf value to use value if present in context, then fall back to cookie.
...
Updated database samples.
Added migrations for sample project models.
Updated Category model to make order not editable.
2017-12-04 22:05:37 -05:00
Brandon Taylor
f4daaeb232
Restructured sample project for Django 2.
...
Refactored database and changed "app" to "samples" so name didn't conflict with "AppConfig".
Replaced deprecated assignment_tag with simple_tag.
Updated unit tests.
2017-12-04 21:29:55 -05:00
Brandon Taylor
d594dbaf62
Merge branch 'touch-support' of github.com:iambrandontaylor/django-admin-sortable into touch-support
2017-10-13 06:40:39 -04:00
Brandon Taylor
4e0c23a1e5
Version bump to 2.1.1.
...
Updated readme files.
2017-10-13 06:40:35 -04:00
Brandon Taylor
0a594928ef
Increase margin between sortable elements in the change list.
2017-10-11 16:13:12 -04:00
Brandon Taylor
bb70d5a3ad
Added jQuery UI Touch Support
2017-10-11 07:15:42 -04:00
Brandon Taylor
a9855808d0
[bt/master] Version bump to 2.1
2017-03-21 06:42:24 -04:00
Jaap Roes
49a7c41896
Use remote_field.model in favor of rel.to when possible
2017-03-16 16:21:59 +01:00
Jaap Roes
209a280ce8
Remove (seemingly broken) TemplateSyntaxError import fallback
2017-03-16 16:21:58 +01:00
Jaap Roes
b0df1ff701
Remove south_field_triple method as South does not support Django >= 1.7
2017-03-16 16:21:58 +01:00
Jaap Roes
8b88dfa9cd
Remove pointless fallback code (it just repeats the previously failed statement)
2017-03-16 16:21:58 +01:00
Jaap Roes
356d88dfde
Remove ordering field lookup fallback
2017-03-16 16:21:58 +01:00
Jaap Roes
ac507e4484
Remove get_queryset fallback
2017-03-16 16:21:58 +01:00
Jaap Roes
f17db22938
Remove inline admin fallback templates
2017-03-16 16:21:58 +01:00
Jaap Roes
74e0c92455
Remove contenttypes.generic import fallbacks
2017-03-16 16:21:58 +01:00
Jaap Roes
e0a85c554b
Remove django.conf.urls import fallback
2017-03-16 16:21:58 +01:00
Brandon Taylor
1990e6653e
[bt] Version 2.0.22 Release Notes
...
Updated readme files with new version information and credits.
Version bump to 2.0.22.
2017-03-14 22:04:23 -04:00
Camilo Nova
9b51e83537
Update to django 1.11
...
Fixes `TypeError, context must be a dict rather than RequestContext.`
As seen in https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/#django-template-loader
2017-03-13 11:57:38 -05:00
Anton Shevchenko
eb5f14fe22
Clarify comment.
2017-03-11 11:20:16 -05:00
Anton Shevchenko
eb5a9e0a8a
Avoid unnecessary db queries: perform the update iff the order field has changed.
2017-03-08 23:28:40 -05:00
Anton Shevchenko
f2f5daf831
Use 'update_fields' to limit the object's save() method to just the order field, so that other fields are not accidentally overwritten with stale data.
2017-03-08 22:14:48 -05:00
Brandon Taylor
d1911519ed
Added version check for 1.7 to create context dict.
2016-11-02 21:29:31 -04:00
Igor Sobolev
12fbb62302
Proper context and breadcrumbs
2016-11-02 12:47:36 -04:00
Brandon Taylor
b96896d890
Merge branch 'develop'
2016-10-30 11:39:17 -04:00
Brandon Taylor
863ff69719
Fix Sorting by ForeignKey
...
Removed do_inline_sorting_url and get_object_or_404 check in admin. The model_type_id should *always* be passed in.
Removed test that asserted that Categories weren't sortable as part of the Project admin. Categories *should* be sortable as part of Project admin as they are a Sortable ForeignKey.
Fixed object_rep template to pass in model_type_id again.
Updated README.
Version bump to 2.0.21
2016-10-30 11:33:20 -04:00
Steven Wood
686ddae81c
Raise NotImplementedError instead of NotImplemented
2016-10-23 10:20:45 -04:00
Brandon Taylor
3f12b10926
Changed version check back to old-style for backwards compatibility.
2016-10-12 22:23:38 -04:00
Brandon Taylor
32726cdcae
Version 2.0.20
...
Bumped version up.
Updated README.
2016-10-12 06:09:49 -04:00
Ruben Dura Tari
3c2935776e
Enables support for primary keys that are not AutoFields.
...
Specially useful when using UUIDs as primary keys.
2016-10-11 18:53:45 +01:00
Brandon Taylor
66e63a29c2
Version bump to 2.0.19.
...
Updated readme.
2016-08-08 21:48:11 -04:00
Brandon Taylor
f5cda8ded9
Updated Font Awesome to 4.6.3
2016-08-08 21:35:43 -04:00
Brandon Taylor
b29590a185
Minor formatting tweaks
2016-08-08 21:34:53 -04:00
Brandon Taylor
ec03f8d17b
Updated change_list template for Django 1.10 compatibility.
2016-08-08 21:34:41 -04:00
Brandon Taylor
5566faed5b
Update sortable inline templates for Django 1.10.x compatibility.
2016-08-08 20:36:35 -04:00
Brandon Taylor
e9b03a3a4f
Merge pull request #143 from MagicSolutions/fix/admin-urs
...
Use separate URLs per model in administration to do the sorting
2016-08-03 10:06:29 -04:00
Brandon Taylor
fc58ee51f0
Updated readme.
...
Version bump to 2.0.18
2016-07-09 18:26:00 -04:00
Steven H Johnson
76a49cc082
Fix missing admin icon for django 1.9
2016-07-09 16:26:45 -04:00
Venelin Stoykov
c59617e004
Fix sorted icons placement
...
- Move icons to the header of the row. By this way they will play nicely with custom
admin themes (like djangocms-admin-style).
- Also fix icons for Django 1.5 (now the admin looks the same as with Django >= 1.6)
2016-06-24 14:04:06 +03:00
Brandon Taylor
ee857c7403
[bt] Release 2.0.17
...
Merged Pull Requests #146 and #147
2016-06-23 22:04:07 -04:00
Brandon Taylor
54482b3bb3
Merge branch 'master' into develop
2016-06-23 21:48:45 -04:00
Brandon Taylor
7788b8e405
Merge pull request #146 from MagicSolutions/fix/change_form_template-selection
...
Play nice with other apps which dynamically choose `change_form_template`
2016-06-23 18:36:02 -07:00
Venelin Stoykov
262ec1b49b
Fix stacked inline icons placement
...
Fixes #138
2016-06-23 18:25:11 +03:00
Venelin Stoykov
2697422497
Play nice with other apps which dynamically choose `change_form_template`
...
If other app admin class is using `property` for `change_form_template` adminsortable fails.
2016-06-23 16:02:01 +03:00
Venelin Stoykov
a479198799
Use separate URLs per model in administration to do the sorting
...
- Correctly check if current user has permissions to made the change
Fixes #142
2016-06-16 14:41:03 +03:00
Brandon Taylor
344927a393
Version 2.0.16 Changes
...
Updated readme.
Version bump to 2.0.16
2016-06-15 20:57:10 -04:00
Brandon Taylor
6ffbb9b358
Merge branch 'master' into develop
2016-06-15 20:40:48 -04:00
Brandon Taylor
79f5aeded2
Merge pull request #141 from MagicSolutions/feature/djangocms-admin-style
...
Fix UI when djangocms-admin-style is used
2016-06-15 17:34:03 -07:00
Brandon Taylor
307db84b66
Testing admin url cleanup
2016-06-15 20:25:56 -04:00
Venelin Stoykov
7c235308b8
Fix UI when djangocms-admin-style is used
2016-06-15 17:53:35 +03:00
Venelin Stoykov
fb6e1118db
Simplify SortableAdmin.get_urls
...
Preserve compatibility
2016-06-15 16:54:07 +03:00
Brandon Taylor
be29289d30
Bumping version due to PyPi error during upload.
2016-03-14 11:40:25 -04:00
Brandon Taylor
557d2d457d
Fixed merge conflicts.
2016-03-14 11:36:41 -04:00
Brandon Taylor
b888063f11
Fixed bad merge.
2016-03-14 11:12:01 -04:00
Brandon Taylor
f004d97bf1
Refactored exception handling for order_field_name
2016-03-14 11:09:18 -04:00
Brandon Taylor
ada42c84de
Version bump to 2.0.13.
...
Updated readme.
Slight refactor on JS to avoid extra function call.
Fixed missing semicolon.
2016-03-10 16:41:23 -05:00
Brandon Taylor
f44220c3de
Fixed missing semicolon.
2016-03-10 16:36:26 -05:00
Brandon Taylor
837a25268d
[bt] Updated selector for index value on sortable tabular inlines.
2016-03-10 16:21:08 -05:00
Patrick
33074d8f65
js: fix indexes finding for tabular inlines
...
js: fix indexes finding for tabular inlines
Not sure with but unless I change the code the line 30 finds <i> tags instead of the input.
2016-03-10 14:43:44 -05:00
Brandon Taylor
70549b2517
Version bump to 2.0.12.
...
Updated docs.
2016-02-23 13:35:21 -05:00
Brandon Taylor
80719bace9
Merge branch 'master' into develop
2016-02-23 13:29:45 -05:00
Adam M. Peacock
bbb88d57ab
Removed extra comma
2016-02-23 12:29:59 -05:00
Adam M. Peacock
3ef33043d7
Passed csrf_cookie_name into the changelist_form extra_context to support variable CSRF_COOKIE_NAME
2016-02-23 12:25:18 -05:00
endeav
ce091c34c6
Use pk instead of id
2016-02-19 15:27:50 +01:00
Brandon Taylor
c891f25bdf
Merge branch 'develop'
...
Adds custom CSRF_COOKIE_NAME support.
2016-02-16 09:59:50 -05:00
Brandon Taylor
c1181b0e52
Support CSRF_COOKIE_NAME
...
Added support for custom CSRF_COOKIE_NAME by refactoring the jquery.django-csrf.js file into a separate .html file that can be used as an include, passing in the CSRF_COOKIE_NAME from settings.
2016-02-16 08:48:32 -05:00
Brandon Taylor
5823af8047
Merge branch 'master' of github.com:iambrandontaylor/django-admin-sortable
2016-01-27 12:05:12 -05:00
Brandon Taylor
a7a6c12deb
Refactored check for ordering information to keep backwards compatibility with Django 1.5.x
2016-01-27 11:50:42 -05:00
Brandon Taylor
15d8f20178
Fixed merged conflict in __init__.py
...
Removed unused import in admin.py
2016-01-27 11:26:03 -05:00
Brandon Taylor
66c73a6bdc
Fixed access of custom order property in model meta, falling back to order for legacy implementations.
...
Updated readme and version bump to 2.0.10
2016-01-27 10:58:58 -05:00
giacomo
84e42720e7
Fix typo in warning
...
Tabluar -> Tabular
2016-01-12 16:13:15 +01:00
Brandon Taylor
8c30ef88e8
Version bump to 2.0.9
2015-12-23 17:26:53 -05:00
Brandon Taylor
b8a5238a09
Removed print debug statement.
...
Updated readme and generated readme in Restructred Text format for PyPi.
2015-12-23 17:22:53 -05:00
Brandon Taylor
7e9d305c90
Added template tag to get django version to allow flat admin specific classing for Django 1.9 or above.
2015-12-23 17:16:47 -05:00
Brandon Taylor
5dee27e077
Added sorting icons.
...
Refactored determination of sortability of classes referenced as sortable foreign keys in admin in a more reliable way.
2015-12-23 16:39:45 -05:00
Brandon Taylor
698ca136d5
Refactored admin url patterns to be compatible with Django 1.8 or higher.
...
Refactored sample_project imports to be compatible with Django 1.9
Updated unit tests for get_next/previous.
Version bump to 2.0.8.
Fixed typo in docs.
2015-12-21 14:11:13 -05:00
Daniel Otero
11e445d99e
Variable jQuery path for Django version 1.9 and above
2015-12-08 22:04:05 +01:00
Brandon Taylor
f5c08f4116
Updated readme and version bump to 2.0.7
2015-11-18 09:22:56 -05:00
Brandon Taylor
3757ca98c0
Added extra JS to deterine which element to highlight in the case where all fieldsets of a stacked inline are set to collapse.
2015-11-18 09:20:45 -05:00
Brandon Taylor
2dab294b0c
Updated readme.
...
Version bump to 2.0.6.
Added JS to remove inline style added by jQueryUI when highlighting form rows.
2015-11-18 07:52:18 -05:00
Brandon Taylor
455e5304aa
Version bump to 2.0.5.
...
Updated readme.
2015-11-14 21:34:36 -05:00
Marco Badan
a5496fed0b
Remove `load url from future`
...
`{% load url from future %}` can be removed from templates since Django 1.5 and it will be removed from Django in 1.9
https://docs.djangoproject.com/en/1.8/releases/1.5/#django-1-5-release-notes
https://docs.djangoproject.com/en/dev/releases/1.7/#loading-ssi-and-url-template-tags-from-future-library
2015-11-14 14:04:56 +01:00
Brandon Taylor
fda8ec917f
Version bump to 2.0.4.
...
Updated readme.
2015-11-12 08:02:49 -05:00
Denis Cornehl
4d8091bc5e
fix slow get_is_sortable when using with inline admins
...
the first `if` call did execute the whole `select` query with (perhaps)
millions of records in them, even though the only result needed here
is one record.
The acually used queryset later will be filtered by the parent-model.
2015-11-11 16:03:19 +01:00
Brandon Taylor
5d1a6f5e98
Updated readme.
...
Version bump to 2.0.3
2015-10-20 09:05:52 -04:00
zakdoek
995baee2d3
Fix bug when used with descending order
2015-10-20 14:11:49 +02:00
Brandon Taylor
736454287e
Version bump to 2.0.2.
...
Updated readme.
2015-10-16 09:09:16 -04:00
Jorge Marques
feeb4e7910
Updates the stacked and tabular inline templates so that the
...
"show_change_link" option is taken into account, mimicking the
corresponding templates in Django 1.8
2015-10-13 18:41:51 +01:00
Brandon Taylor
2543f02ce7
Fixed a typp in adminsortable/fields.py comments.
...
Updated readme.
2015-09-07 21:26:36 -04:00
Brandon Taylor
bee71e6d40
Refactored order_field_name out of Sortable class, instead deriving from Meta.ordering, since you have to set Meta.ordering to the order field to get the proper Sorting anyway.
2015-09-02 09:38:10 -04:00
Brandon Taylor
74a6cadf8d
Added legacy model definition back for seamless backwards compatibility.
...
Updated readme.
Added sample legacy model implementation.
2015-08-24 12:55:56 -04:00
Brandon Taylor
c50541aa74
Version bump to 1.8.5.
...
Updated readme.
2015-08-24 09:18:54 -04:00
Brandon Taylor
6c5a9058fe
Minor PEP8, text and formatting tweaks.
2015-08-24 08:18:22 -04:00
Brandon Taylor
43fef78876
Work in progress on refactoring the Sortable class into a non-obtrusive mixin.
2015-08-23 22:25:55 -04:00
Brandon Taylor
100177f11d
Version bump to 1.8.4
2015-07-05 23:04:03 -04:00
Brandon Taylor
da0da5e690
Fixes: Bug in get_previous() method #108
...
Added ordering to _filter_objects internal method to correctly select previous object.
2015-07-05 22:37:20 -04:00
Brandon Taylor
ef05c0f7cb
Version bump to 1.8.3.
...
Updated readme with 1.8.3 information.
Updated travis configuration to remove deprecated config settings.
2015-04-08 22:16:20 -04:00
Brandon Taylor
ad09081ab4
Added exception handling for get_queryset attribute.
2015-04-08 22:06:14 -04:00
Brandon Taylor
a5c1c53400
Added Polish translations.
...
Version bump to 1.8.2
2015-04-01 12:01:16 -04:00
Tomasz Gabrysiak
a34adef6ba
add polish translation
2015-03-30 21:17:49 +02:00
Brandon Taylor
4f16fd266c
Version bump to 1.8.1.
...
Updated readme.
2015-03-24 09:19:58 -04:00