mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-18 20:11:29 +08:00
fixes for FormMixin's get_form/get_form_class
This commit is contained in:
1 parent
c09a97e005
commit
df5c70c703
11 files changed
+139
-55
No files matched your search
@@ -26,9 +26,7 @@ class ModelClassInitializer(metaclass=ABCMeta):
|
||||
if meta_node is None:
|
||||
return None
|
||||
|
||||
for lvalue, rvalue in iter_over_assignments(meta_node.defn):
|
||||
if isinstance(lvalue, NameExpr) and lvalue.name == name:
|
||||
return rvalue
|
||||
return helpers.get_assigned_value_for_class(meta_node, name)
|
||||
|
||||
def is_abstract_model(self) -> bool:
|
||||
is_abstract_expr = self.get_meta_attribute('abstract')
|
||||
|
||||
Reference in new issue
Block a user