1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

[2.0.x] Fixed #27846 -- Made Model.refresh_from_db() clear cached relations.

Backport of a7b5ad8b19 from master
This commit is contained in:
Paulo
2017-09-19 12:51:19 -05:00
committed by Tim Graham
parent 51998a2988
commit 5d3f2aa3f1
3 changed files with 22 additions and 1 deletions

View File

@@ -17,6 +17,10 @@ class Article(models.Model):
return self.headline
class FeaturedArticle(models.Model):
article = models.OneToOneField(Article, models.CASCADE, related_name='featured')
class ArticleSelectOnSave(Article):
class Meta:
proxy = True