mirror of
https://github.com/django/django.git
synced 2025-10-30 09:06:13 +00:00
[1.9.x] Fixed #25622 -- Accounted for generic relations in the admin to field validation
Thanks to Jonathan Liuti for the report and Tim Graham for the review.
Backport of 9dcfecb7c6 from master
This commit is contained in:
@@ -31,18 +31,19 @@ from .models import (
|
||||
EmptyModelHidden, EmptyModelMixin, EmptyModelVisible, ExplicitlyProvidedPK,
|
||||
ExternalSubscriber, Fabric, FancyDoodad, FieldOverridePost,
|
||||
FilteredManager, FooAccount, FoodDelivery, FunkyTag, Gadget, Gallery,
|
||||
Grommet, ImplicitlyGeneratedPK, Ingredient, InlineReference, InlineReferer,
|
||||
Inquisition, Language, Link, MainPrepopulated, ModelWithStringPrimaryKey,
|
||||
NotReferenced, OldSubscriber, OtherStory, Paper, Parent,
|
||||
ParentWithDependentChildren, Person, Persona, Picture, Pizza, Plot,
|
||||
PlotDetails, PluggableSearchPerson, Podcast, Post, PrePopulatedPost,
|
||||
PrePopulatedPostLargeSlug, PrePopulatedSubPost, Promo, Question, Recipe,
|
||||
Recommendation, Recommender, ReferencedByInline, ReferencedByParent,
|
||||
RelatedPrepopulated, Report, Reservation, Restaurant,
|
||||
RowLevelChangePermissionModel, Section, ShortMessage, Simple, Sketch,
|
||||
State, Story, StumpJoke, Subscriber, SuperVillain, Telegram, Thing,
|
||||
Topping, UnchangeableObject, UndeletableObject, UnorderedObject,
|
||||
UserMessenger, Villain, Vodcast, Whatsit, Widget, Worker, WorkHour,
|
||||
GenRelReference, Grommet, ImplicitlyGeneratedPK, Ingredient,
|
||||
InlineReference, InlineReferer, Inquisition, Language, Link,
|
||||
MainPrepopulated, ModelWithStringPrimaryKey, NotReferenced, OldSubscriber,
|
||||
OtherStory, Paper, Parent, ParentWithDependentChildren, Person, Persona,
|
||||
Picture, Pizza, Plot, PlotDetails, PluggableSearchPerson, Podcast, Post,
|
||||
PrePopulatedPost, PrePopulatedPostLargeSlug, PrePopulatedSubPost, Promo,
|
||||
Question, Recipe, Recommendation, Recommender, ReferencedByGenRel,
|
||||
ReferencedByInline, ReferencedByParent, RelatedPrepopulated, Report,
|
||||
Reservation, Restaurant, RowLevelChangePermissionModel, Section,
|
||||
ShortMessage, Simple, Sketch, State, Story, StumpJoke, Subscriber,
|
||||
SuperVillain, Telegram, Thing, Topping, UnchangeableObject,
|
||||
UndeletableObject, UnorderedObject, UserMessenger, Villain, Vodcast,
|
||||
Whatsit, Widget, Worker, WorkHour,
|
||||
)
|
||||
|
||||
|
||||
@@ -944,6 +945,8 @@ site.register(ReferencedByParent)
|
||||
site.register(ChildOfReferer)
|
||||
site.register(ReferencedByInline)
|
||||
site.register(InlineReferer, InlineRefererAdmin)
|
||||
site.register(ReferencedByGenRel)
|
||||
site.register(GenRelReference)
|
||||
|
||||
# We intentionally register Promo and ChapterXtra1 but not Chapter nor ChapterXtra2.
|
||||
# That way we cover all four cases:
|
||||
|
||||
Reference in New Issue
Block a user