model_split: Fixed #19236 - fixed error for abstract models with a split method #494

Merged
merged 2 commits into from Nov 4, 2012

Projects

None yet

2 participants

Contributor
mrj0 commented Nov 4, 2012
@alex alex commented on an outdated diff Nov 4, 2012
django/db/models/fields/related.py
@@ -54,14 +54,16 @@ class MyModel(Model):
else:
# Look for an "app.Model" relation
- try:
- app_label, model_name = relation.split(".")
- except ValueError:
- # If we can't split, assume a model in current app
- app_label = cls._meta.app_label
- model_name = relation
- except AttributeError:
- # If it doesn't have a split it's actually a model class
+
+ if isinstance(relation, basestring):
alex
alex Nov 4, 2012 Member

basestring isn't correct on python3, you want to use django.utils.six.string_types

Member
alex commented Nov 4, 2012

Besides that one comment this is good to go!

@alex alex merged commit 8d3f932 into django:master Nov 4, 2012
@alex alex added a commit that referenced this pull request Nov 4, 2012
@alex alex + Alex Gaynor [1.5.x]Merge pull request #494 from mrj0/model_split
model_split: Fixed #19236 - fixed error for abstract models with a split method

Backport of 8d3f932
69a0c91
@kmtracey kmtracey added a commit that referenced this pull request Dec 21, 2015
@kmtracey @timgraham kmtracey + timgraham Fixed #494 -- Added ability to specify classes on admin inline fields…
…ets.

This includes the ability to collapse inlines by specifying a class named
'collapse'.
5399ccc
@timgraham timgraham added a commit to timgraham/django that referenced this pull request Jan 11, 2016
@timgraham timgraham Refs #494 -- Fixed a flaky admin_inlines tests. ff062b4
@timgraham timgraham added a commit to timgraham/django that referenced this pull request Jan 11, 2016
@timgraham timgraham Refs #494 -- Fixed a flaky admin_inlines tests. 99d2469
@lwiecek lwiecek added a commit to lwiecek/django that referenced this pull request Apr 14, 2016
@kmtracey @lwiecek kmtracey + lwiecek Fixed #494 -- Added ability to specify classes on admin inline fields…
…ets.

This includes the ability to collapse inlines by specifying a class named
'collapse'.
4823411
@lwiecek lwiecek added a commit to lwiecek/django that referenced this pull request Apr 14, 2016
@timgraham @lwiecek timgraham + lwiecek Refs #494 -- Fixed a flaky admin_inlines tests. 3cda367
@olivierdalang olivierdalang added a commit to olivierdalang/django that referenced this pull request Aug 10, 2016
@kmtracey @olivierdalang kmtracey + olivierdalang Cherrypick 5399ccc
Fixed #494 -- Added ability to specify classes on admin inline fieldsets.

Conflicts:
	docs/releases/1.11.txt
306a55a
@olivierdalang olivierdalang added a commit to olivierdalang/django that referenced this pull request Dec 14, 2016
@kmtracey @olivierdalang kmtracey + olivierdalang Cherrypick 5399ccc
Fixed #494 -- Added ability to specify classes on admin inline fieldsets.

Conflicts:
	docs/releases/1.11.txt
61c1a11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment