mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
magic-removal: Changed the way app_label is calculated
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
683e075a01
commit
c6cdd4d7f6
@ -778,7 +778,8 @@ class ModelBase(type):
|
|||||||
app_label = replaces_module[0]
|
app_label = replaces_module[0]
|
||||||
else:
|
else:
|
||||||
app_package.__dict__[opts.module_name] = new_mod
|
app_package.__dict__[opts.module_name] = new_mod
|
||||||
app_label = app_package.__name__[app_package.__name__.rfind('.')+1:]
|
app_label = app_package.__name__.replace('.models', '')
|
||||||
|
app_label = app_label[app_label.rfind('.')+1:]
|
||||||
|
|
||||||
# Populate the _MODELS member on the module the class is in.
|
# Populate the _MODELS member on the module the class is in.
|
||||||
# Example: django.models.polls will have a _MODELS member that will
|
# Example: django.models.polls will have a _MODELS member that will
|
||||||
|
Loading…
x
Reference in New Issue
Block a user