Django Zinnia url extension in walkthrough?

Following the steps here: it is not clear if I have all the correct steps due to the wording making it difficult to debug my code.

I created the files below, but I get a ViewDoesNotExist error while trying to access anything (note: everything works fine if I switch the main to point to the default Zinnia urls.


Tried entry_shortlink in zinnia.views.entries module. Error: Object 'module' has no attribute 'entry_shortlink'

In the main ----

url(r'^news/', include('qclick.publisher.urls.entries')),


publisher / urls / (copied from zinnia defaults and only edited below) ----





publisher / ----

from zinnia.views.decorators import protect_entry
from django.views.generic.list_detail import object_detail

entry_detail = protect_entry(object_detail)


publisher / ----

from django.db import models
from zinnia.models import EntryAbstractClass

class EntryWithNewUrl(EntryAbstractClass):
        """Entry with '/news/<id>/' URL"""

    def get_absolute_url(self):
            return ('zinnia_entry_detail', (),


I'm sure the error is creeping in because I'm not extending the entry correctly, where the manual says "just use the method described in the Extended Entry model document to create a new class based on EntryAbstractClass with a new get_absolute_url".

As it is not clear what elements I need to add from the link on ....

I am just trying to run this with the / news / id / url pass and then after that it is decided to change it to my preferred / news / slug /.

I also posted this on a Google group run by author Zinnia, but with no response. All help is appreciated!


source to share

All Articles