From a6feb85d3ad8bf343b85e264c38484989f99fca8 Mon Sep 17 00:00:00 2001 From: saganshul Date: Thu, 10 Mar 2016 03:21:35 +0530 Subject: [PATCH] module_name changed to model_name. Fixes #26 --- follow/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/follow/utils.py b/follow/utils.py index aa0d4b6..b6f4847 100644 --- a/follow/utils.py +++ b/follow/utils.py @@ -17,10 +17,10 @@ def register(model, field_name=None, related_name=None, lookup_method_name='get_ registry.append(model) if not field_name: - field_name = 'target_%s' % model._meta.module_name + field_name = 'target_%s' % model._meta.model_name if not related_name: - related_name = 'follow_%s' % model._meta.module_name + related_name = 'follow_%s' % model._meta.model_name field = ForeignKey(model, related_name=related_name, null=True, blank=True, db_index=True)