Custom generator method doesn't run

120 views
Skip to first unread message

Rafael Reuber

unread,
Jun 22, 2013, 9:25:20 PM6/22/13
to model...@googlegroups.com
I created a custom generator method to django's DateTimeField following the instructions described on basic usage documentation, but it's doesn't work. 
When I execute my tests, the custom generator doesn't run.

These is model_mommy's configurations at my settings.py file:

def gen_datetime():
    from datetime import datetime, timedelta
    return datetime.now() + timedelta(days=1)

MOMMY_CUSTOM_FIELDS_GEN = {
    'django.db.models.DateTimeField': gen_datetime,
}

vanders...@gmail.com

unread,
Jun 23, 2013, 11:17:36 AM6/23/13
to Rafael Reuber, model...@googlegroups.com
Thank you! i'll check it out. Could you create the issue at github?


2013/6/22 Rafael Reuber <rafael...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Model Mommy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to model-mommy...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Vanderson Mota dos Santos

Rafael Reuber

unread,
Jun 23, 2013, 12:52:23 PM6/23/13
to model...@googlegroups.com, Rafael Reuber
Hi, Vanderson.

I installed model_mommy through pip install. I make a little test: I removed the pip's version and installed github's version. And now the custom generator works! So the pip's version it's a little outdated, I supose.

Sure, I'll create a issue.
Reply all
Reply to author
Forward
0 new messages