Created
January 19, 2016 17:39
-
-
Save lightstrike/3846830db8730d9667d5 to your computer and use it in GitHub Desktop.
Setting up model mommy generators for custom fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from model_mommy import generators | |
MOMMY_CUSTOM_FIELDS_GEN = { | |
'easy_thumbnails.fields.ThumbnailerImageField': generators.gen_image_field, | |
'model_utils.fields.AutoCreatedField': generators.gen_datetime, | |
'model_utils.fields.AutoLastModifiedField': generators.gen_datetime, | |
'django_extensions.db.fields.AutoSlugField': generators.gen_slug, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
adding this kind of import in settings is bad practice