Tadas Dailyda
2028ecda1e
Correct comment in admin.py
2016-05-24 05:06:50 -04:00
Tadas Dailyda
e33cf73fb2
Admin refactoring based on #58 (related field to child models and other fixes) but with backwards compatibility
2016-05-20 06:50:33 -04:00
Diederik van der Boor
ed64ed283f
Resolved deprecation warning for Django 1.10
2016-05-04 11:29:53 +02:00
Diederik van der Boor
ccda52d91e
Fixed the breadcrumb of the object_history template.
...
NOTE: this could conflict with projects that use django-reversion,
if the `VersionAdmin` is the last in the inheritance chain.
2016-02-18 18:17:08 +01:00
Diederik van der Boor
46e41a6c1c
Fix changeform_view() redirection to the child admin site.
...
This method is normally called from `add_view()` and `change_view()`.
However, some third party modules (such as django-reversion) call this
method directly. By redirecting those calls to the child admin, their
views also display the proper admin views.
2016-02-17 14:49:40 +01:00
Diederik van der Boor
14a5417891
Added yet another hack to keep the child admin site happy.
...
This really validates a different solution to the child admin layout,
e.g. by registering the models in the regular admin site.
2016-02-17 12:27:33 +01:00
Diederik van der Boor
efdebb1575
Fix missing redirect for the history_view.
...
This fixes django-reversion, and partally django-reversion-compare.
2016-02-17 11:20:11 +01:00
Diederik van der Boor
01a35cfe95
Fix Django 1.9 handling of custom URLs.
...
The new change-URL redirect overlapped any custom URLs defined in the child admin.
This makes sure the redirect doesn't interfere with custom URLs.
2016-02-17 11:20:11 +01:00
Diederik van der Boor
aaf06c71a5
Fix PEP8 whitespace issues
...
autopep8 -r polymorphic/ example/ -i
--select=E112,E113,E115,E116,E122,E123,E125,E127,E128,E201,E202,E203,E211,E225,E226,E227,E228,E231,E251,E261,E262,E271,E272,E273,E274,E301,E302,E303,E304,E309,E711,E713,W291,W293,W391
--exclude migrations,south_migrations
(line conditiation fixes: E123,E125,E122,E127,E128)
2015-12-28 15:16:29 +01:00
Jonas Haag
ee2e0a95ea
Extend comment about admin URL patching
2015-12-16 10:31:36 -03:00
Hugo Osvaldo Barrera
fb32b97b37
Remove obsolete compatibility code comment
2015-12-16 10:31:36 -03:00
Hugo Osvaldo Barrera
e73a4662c3
Prevent infinite redirection on django1.9
...
See here[1] as to why this is an issue, and why we can skip the avoided
code on django>=1.9.
[1]: https://docs.djangoproject.com/en/1.9/releases/1.9/#django-contrib-admin
2015-12-16 10:31:36 -03:00
Hugo Osvaldo Barrera
b996d1c377
Avoid broken references to declared_fieldset
...
Check if this attribute exists first, since it does not in recent django
versions.
2015-12-16 10:31:33 -03:00
Hugo Osvaldo Barrera
ad5ce60158
Remove reference to obsolete request.REQUEST
2015-10-21 22:27:00 -03:00
Hugo Osvaldo Barrera
31bfe8d1e7
Remove deprecated django.conf.urls.patterns
2015-10-21 22:18:21 -03:00
Tai Lee
bcc39a9086
Raise Http404 if object does not exist.
2015-09-22 09:55:03 +10:00
Diederik van der Boor
1979ee6079
Remove unused import after merging #139
2015-08-04 16:13:06 +02:00
Martin Maillard
941e447ed0
Use parent admin site class for child admin site
...
Using the ``AdminSite`` class directly can cause issues when the parent
model is registered with a custom admin site class.
2015-06-08 14:04:26 +02:00
Diederik van der Boor
1ff5f148b6
Fixed Django 1.8 support for related field widgets.
...
The RelatedFieldWidgetWrapper tries to resolve the "change" url with
"__fk__" as ID value, which broke with our strict pk_regex
2015-04-30 11:39:13 +02:00
Diederik van der Boor
5f4e6e18ba
Fix missing import
2015-04-08 13:49:10 +02:00
Diederik van der Boor
9ef7ccb65e
Fixed long/int issue for Python 3.
...
This closes #126 with a fix that won't degrate Python 2 code.
2015-04-08 13:38:26 +02:00
Diederik van der Boor
9efc5cfcb2
Merge pull request #124 from benkonrath/fix-admin-500-error
...
Don't remove '/' from id when it's not in the path
2015-04-08 13:35:25 +02:00
Ben Konrath
2a8a16edb8
Don't remove '/' from id when it's not in the path
2015-03-02 11:24:50 +01:00
Luis Zárate
727df8bd3d
Fixed preserved filter for django 1.7
...
The problem occurs when you have a filter and create o delete a child, when is back to change list
the filter is lost, and have a e=-1 as a get parameter
2015-02-09 08:15:42 -06:00
Diederik van der Boor
948749dbdb
Remove Django 1.7 warnings
2014-10-14 17:30:25 +02:00
Diederik van der Boor
84791daf47
Merge pull request #99 from benkonrath/admin_class_permissions
...
Use admin class function to check permissions.
2014-09-22 16:03:55 +02:00
Diederik van der Boor
981614e5c6
Merge branch 'django_1.7_support' of https://github.com/g3rd/django_polymorphic
...
Conflicts:
docs/managers.rst
polymorphic/admin.py
polymorphic/manager.py
polymorphic/tests.py
runtests.py
2014-09-22 15:42:35 +02:00
Diederik van der Boor
ff6b09e7c7
admin: split get_queryset() / queryset() methods.
...
avoid calling loops due to some inherited classes
2014-09-22 15:14:32 +02:00
Diederik van der Boor
ea160669cf
Merge pull request #91 from mlsen/master
...
Django 1.8 compatibility
2014-09-22 14:51:03 +02:00
Chad Shryock
cc53b3003e
Remove exception.
2014-09-17 08:30:12 -04:00
Chad Shryock
b9654b7138
Missing return.
2014-09-17 08:26:28 -04:00
Chad Shryock
734752c2e7
Django 1.7 upgrades
2014-09-16 22:11:13 -04:00
Ben Konrath
6aa9d7cc3a
Use admin class function to check permissions.
2014-09-11 15:18:40 +02:00
Chad Shryock
af4843e54b
Cleared up the Django 1.8 Warning messages.
2014-09-10 23:13:51 -04:00
Ben Konrath
ec5ce49d81
Use consistent labels in admin.
2014-08-04 15:05:13 +02:00
Diederik van der Boor
14df8c529e
Move the get_permission_codename import to the main code.
...
cc #93
2014-07-29 12:15:09 +02:00
Kevin Armenat
029bb2ae1a
added django < 1.6 compatibilty for permission codename generation
2014-07-29 11:15:38 +02:00
Kevin Armenat
6ce390f777
added permission check for all child types
2014-07-29 09:47:23 +02:00
Marius Lueck
d755d257ef
Changed super call of get_queryset to queryset
2014-07-25 22:55:58 +02:00
Marius Lueck
fb1795ad12
Fixed compatibility with django 1.8
2014-07-25 11:48:07 +02:00
Jacob Rief
62e7940c33
Fixed: adding polymoric model with django-parler did not work
2014-07-18 18:26:51 +02:00
Diederik van der Boor
d8b40167d3
Mention the improvements of #87 in the changelog and documentation too.
2014-07-08 17:18:07 +02:00
Andrew
d8d6f07f71
Adds pk_regex attr in PolymorphicParentModelAdmin
2014-07-08 18:05:04 +03:00
Diederik van der Boor
b5774423f7
Improve on #69 , using setdefault() and update example project
...
Camp site rule; leave things tidier than you found them :)
2014-04-03 14:27:56 +02:00
Evan Borgstrom
d93add71fb
Be more specific in the condition before setting 'fields'
2014-03-13 16:50:25 -04:00
Evan Borgstrom
134c44bef0
Prevent infinite recursion in Django 1.6
2014-03-13 16:39:13 -04:00
Diederik van der Boor
a8d27ca94e
Pass ``/admin/app/model/ID/...`` URLs to the correct admin backend.
...
Using the ID field, the correct ``ct_id`` parameter can already be
determined.
2013-09-17 11:02:38 +02:00
Diederik van der Boor
e0446bd76c
Fix TypeError when ``base_form`` was not defined.
2013-09-17 10:50:46 +02:00
Diederik van der Boor
638ecd5813
Fix admin validation errors related to additional non-model form fields.
2013-09-05 11:36:54 +02:00
Diederik van der Boor
b2be0701ca
Fix missing permission check in the "add type" view.
...
The permissions were checked in the next step,
so this didn't cause a security issue.
2013-08-20 12:07:29 +02:00