On Tue, Jul 03, 2012 at 09:35:04AM +0300, Markus T�rnqvist wrote:
>
>I'm not sure I understand the design logic. Page should read like the ultimate
>base class? Because Link inherits from Page, but Page.get_absolute_url() looks
>at self.content_model to see if it's a link?
Ok, this is because Mezzanine selects Page objects, probably getting the
inherited ones in the same query, and that's why it's hard to implement
this in the subclass. There should be a mechanism, though, because a
superclass can not and should not know about subclasses.
>It's a bug, or mis-feature, in the slugification anyway. I was mistaken in
>my previous message. The link I ended up with was /blog/artikkelit (not
>/blog/artikkeli, but "artikkelit", which is the slugified title).
As much as Mezzanine seems to rock, I unfortunately don't have the time
to fork and delve deep and fix and discuss changes and test I don't break
all the Mezzanine sites out there.
Instead I wrote another app,
https://github.com/mjtorn/mezzanine-categorylink
It works like a charm here for exactly the purposes I want.
Had to screw around a bit with resolve anyway, but meh, it works and hopefully
helps someone else out there.
>Nowhere (that I found yet) does the code talk about the URL field, which
>just so disappears when I Save and Continue Editing.
No idea about the form really but doesn't even matter now.
--
mjt