mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #14007 -- Added model discovery in models module without the need to specify app_label.
Thanks mark@ and Aramgutang for work on the patch.
This commit is contained in:
parent
fba6c2ede7
commit
2333c9662b
7 changed files with 30 additions and 17 deletions
|
@ -6,6 +6,3 @@ class Article(models.Model):
|
|||
sites = models.ManyToManyField(Site)
|
||||
headline = models.CharField(max_length=100)
|
||||
publications = models.ManyToManyField("model_package.Publication", null=True, blank=True,)
|
||||
|
||||
class Meta:
|
||||
app_label = 'model_package'
|
||||
|
|
|
@ -3,6 +3,3 @@ from django.db import models
|
|||
|
||||
class Publication(models.Model):
|
||||
title = models.CharField(max_length=30)
|
||||
|
||||
class Meta:
|
||||
app_label = 'model_package'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue