mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Simplified imports from django.db and django.contrib.gis.db.
This commit is contained in:
committed by
Mariusz Felisiak
parent
469bf2db15
commit
335c9c94ac
@@ -140,7 +140,7 @@ def fields_for_model(model, fields=None, exclude=None, widgets=None,
|
||||
ignored = []
|
||||
opts = model._meta
|
||||
# Avoid circular import
|
||||
from django.db.models.fields import Field as ModelField
|
||||
from django.db.models import Field as ModelField
|
||||
sortable_private_fields = [f for f in opts.private_fields if isinstance(f, ModelField)]
|
||||
for f in sorted(chain(opts.concrete_fields, sortable_private_fields, opts.many_to_many)):
|
||||
if not getattr(f, 'editable', False):
|
||||
|
||||
Reference in New Issue
Block a user