Commit c59a6648112437c8775e6d6805b419e62fa1a466

Authored by Claude Paroz
1 parent 2ab9c149

Replaced obsolete module_name by model_name

... ... @@ -303,7 +303,7 @@ class Moderator(object):
303 303 model_or_iterable = [model_or_iterable]
304 304 for model in model_or_iterable:
305 305 if model in self._registry:
306   - raise AlreadyModerated("The model '%s' is already being moderated" % model._meta.module_name)
  306 + raise AlreadyModerated("The model '%s' is already being moderated" % model._meta.model_name)
307 307 self._registry[model] = moderation_class(model)
308 308
309 309 def unregister(self, model_or_iterable):
... ... @@ -319,7 +319,7 @@ class Moderator(object):
319 319 model_or_iterable = [model_or_iterable]
320 320 for model in model_or_iterable:
321 321 if model not in self._registry:
322   - raise NotModerated("The model '%s' is not currently being moderated" % model._meta.module_name)
  322 + raise NotModerated("The model '%s' is not currently being moderated" % model._meta.model_name)
323 323 del self._registry[model]
324 324
325 325 def pre_save_moderation(self, sender, comment, request, **kwargs):
... ...
... ... @@ -86,10 +86,10 @@ def post_comment(request, next=None, using=None):
86 86 # These first two exist for purely historical reasons.
87 87 # Django v1.0 and v1.1 allowed the underscore format for
88 88 # preview templates, so we have to preserve that format.
89   - "comments/%s_%s_preview.html" % (model._meta.app_label, model._meta.module_name),
  89 + "comments/%s_%s_preview.html" % (model._meta.app_label, model._meta.model_name),
90 90 "comments/%s_preview.html" % model._meta.app_label,
91 91 # Now the usual directory based template hierarchy.
92   - "comments/%s/%s/preview.html" % (model._meta.app_label, model._meta.module_name),
  92 + "comments/%s/%s/preview.html" % (model._meta.app_label, model._meta.model_name),
93 93 "comments/%s/preview.html" % model._meta.app_label,
94 94 "comments/preview.html",
95 95 ]
... ...
Please register or login to post a comment