Commit c59a6648112437c8775e6d6805b419e62fa1a466
1 parent
2ab9c149
Replaced obsolete module_name by model_name
Showing
2 changed files
with
4 additions
and
4 deletions
| @@ -303,7 +303,7 @@ class Moderator(object): | @@ -303,7 +303,7 @@ class Moderator(object): | ||
| 303 | model_or_iterable = [model_or_iterable] | 303 | model_or_iterable = [model_or_iterable] |
| 304 | for model in model_or_iterable: | 304 | for model in model_or_iterable: |
| 305 | if model in self._registry: | 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 | self._registry[model] = moderation_class(model) | 307 | self._registry[model] = moderation_class(model) |
| 308 | 308 | ||
| 309 | def unregister(self, model_or_iterable): | 309 | def unregister(self, model_or_iterable): |
| @@ -319,7 +319,7 @@ class Moderator(object): | @@ -319,7 +319,7 @@ class Moderator(object): | ||
| 319 | model_or_iterable = [model_or_iterable] | 319 | model_or_iterable = [model_or_iterable] |
| 320 | for model in model_or_iterable: | 320 | for model in model_or_iterable: |
| 321 | if model not in self._registry: | 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 | del self._registry[model] | 323 | del self._registry[model] |
| 324 | 324 | ||
| 325 | def pre_save_moderation(self, sender, comment, request, **kwargs): | 325 | def pre_save_moderation(self, sender, comment, request, **kwargs): |
| @@ -86,10 +86,10 @@ def post_comment(request, next=None, using=None): | @@ -86,10 +86,10 @@ def post_comment(request, next=None, using=None): | ||
| 86 | # These first two exist for purely historical reasons. | 86 | # These first two exist for purely historical reasons. |
| 87 | # Django v1.0 and v1.1 allowed the underscore format for | 87 | # Django v1.0 and v1.1 allowed the underscore format for |
| 88 | # preview templates, so we have to preserve that format. | 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 | "comments/%s_preview.html" % model._meta.app_label, | 90 | "comments/%s_preview.html" % model._meta.app_label, |
| 91 | # Now the usual directory based template hierarchy. | 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 | "comments/%s/preview.html" % model._meta.app_label, | 93 | "comments/%s/preview.html" % model._meta.app_label, |
| 94 | "comments/preview.html", | 94 | "comments/preview.html", |
| 95 | ] | 95 | ] |
Please
register
or
login
to post a comment