~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to django/contrib/comments/moderation.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-11-07 15:33:49 UTC
  • mfrom: (1.3.12)
  • Revision ID: package-import@ubuntu.com-20131107153349-e31sc149l2szs3jb
Tags: 1.6-1
* New upstream version. Closes: #557474, #724637.
* python-django now also suggests the installation of ipython,
  bpython, python-django-doc, and libgdal1.
  Closes: #636511, #686333, #704203
* Set package maintainer to Debian Python Modules Team.
* Bump standards version to 3.9.5, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
            model_or_iterable = [model_or_iterable]
303
303
        for model in model_or_iterable:
304
304
            if model in self._registry:
305
 
                raise AlreadyModerated("The model '%s' is already being moderated" % model._meta.module_name)
 
305
                raise AlreadyModerated("The model '%s' is already being moderated" % model._meta.model_name)
306
306
            self._registry[model] = moderation_class(model)
307
307
 
308
308
    def unregister(self, model_or_iterable):
318
318
            model_or_iterable = [model_or_iterable]
319
319
        for model in model_or_iterable:
320
320
            if model not in self._registry:
321
 
                raise NotModerated("The model '%s' is not currently being moderated" % model._meta.module_name)
 
321
                raise NotModerated("The model '%s' is not currently being moderated" % model._meta.model_name)
322
322
            del self._registry[model]
323
323
 
324
324
    def pre_save_moderation(self, sender, comment, request, **kwargs):