Question

I had a django app in which i am using django-zinnia-blog for my blog functionality.

Issue One

And now i updated zinnia with latest github version and i am getting the below wierd error

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x941554c>>
Traceback (most recent call last):
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run
    self.validate(display_num_errors=True)
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/core/management/base.py", line 280, in validate
    num_errors = get_validation_errors(s, app)
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/core/management/validation.py", line 35, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/db/models/loading.py", line 166, in get_app_errors
    self._populate()
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/db/models/loading.py", line 72, in _populate
    self.load_app(app_name, True)
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/db/models/loading.py", line 96, in load_app
    models = import_module('.models', app_name)
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/user/name/virtualenvironment/apps/proname/proname/apps/zinnia/models/__init__.py", line 19, in <module>
    moderator.register(Entry, EntryCommentModerator)
  File "/home/user/Envs/zinnia/local/lib/python2.7/site-packages/django/contrib/comments/moderation.py", line 305, in register
    raise AlreadyModerated("The model '%s' is already being moderated" % model._meta.module_name)
django.contrib.comments.moderation.AlreadyModerated: The model 'entry' is already being moderated

django version -- 1.5.3

So why it is displaying AlreadyModerated error when trying to update the zinnia witj latest version ?

Issue Two

Below are my specs/setings

settings.py

ZINNIA_ENTRY_BASE_MODEL = 'proname.apps.app_name.models.EntryBase'
ZINNIA_SAVE_PING_DIRECTORIES = False
ZINNIA_PING_EXTERNAL_URLS = False

Actually i am trying to extend the Entry model as below

from zinnia.models_bases.entry import AbstractEntry

class EntryBase(AbstractEntry):
    pass

    class Meta(AbstractEntry.Meta):
        abstract = True
        verbose_name_plural = _("Entry")
        verbose_name_plural = _("Entries")

    def __unicode__(self):
        return u'Entry %s' % self.title

django version -- 1.4.5

When i used above django version i am getting an extra error along with above one

raise ImproperlyConfigured('%s cannot be imported' % model_path)

django.core.exceptions.ImproperlyConfigured: zinnia.models_bases.entry.AbstractEntry cannot be imported

So can anyone please let me know to solve the above issues like

AlreadyModerated when updating to latest github zinnia code

Trying to extend the Entry model ?

and made the zinnia work correctly ?

No correct solution

OTHER TIPS

I had the same problem and I figure out the problem changing version of zinnia to 0.14.3

Zinnia 0.15 only works with django 1.7

Use v0.14.3 instead.

(https://github.com/Fantomas42/django-blog-zinnia/issues/388)

I came across this issue too. The way I was able to fix it was to link back to the model_bases folder in the original zinnia package. In my site's 'zinnia' folder (where the updated South migrations are stored):

$ ln -sf <python-path>/lib/python2.7/site-packages/zinnia/models_bases .
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top