summaryrefslogtreecommitdiff
path: root/factory/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'factory/helpers.py')
-rw-r--r--factory/helpers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/factory/helpers.py b/factory/helpers.py
index 37b41bf..19431df 100644
--- a/factory/helpers.py
+++ b/factory/helpers.py
@@ -28,6 +28,7 @@ import logging
from . import base
from . import declarations
+from . import django
@contextlib.contextmanager
@@ -49,7 +50,9 @@ def debug(logger='factory', stream=None):
def make_factory(klass, **kwargs):
"""Create a new, simple factory for the given class."""
factory_name = '%sFactory' % klass.__name__
- kwargs[base.FACTORY_CLASS_DECLARATION] = klass
+ class Meta:
+ model = klass
+ kwargs['Meta'] = Meta
base_class = kwargs.pop('FACTORY_CLASS', base.Factory)
factory_class = type(base.Factory).__new__(