It seems to be working now... I can't say what went wrong, however - the legacy code I copied over looked exactly the same as the current code :/. But thanks!
-Michael On Mar 10, 8:44 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, Mar 10, 2009 at 7:40 PM, Michael Strickland > <moriog...@gmail.com>wrote: > > > > > > > I currently have a base model called Content, with models such as > > Article, Image, and Video subclassing Content. Currently, > > get_absolute_url works only when it is located in Content - if I try > > placing get_absolute_url in any of the inherited models, instead of > > the base model, it returns an empty string. > > > Can anyone confirm that it isn't possible to define an absolute url > > for an inherited model? Or if it is possible, is there something > > special I must do to allow this? > > > Alternatively, would there be any way to include the model name in the > > url? For example: > > > /news/article/09/03/10/slug1 > > /news/article/09/03/10/slug2 > > /news/image/09/03/10/slug1 > > > If I put the model name in get_absolute_url, then I would only need it > > to be defined in the base model (I got this idea when I saw that you > > could do something similar with "related_name" - you include (%class) > > in the name, and it treats it as the class name. > > >http://docs.djangoproject.com/en/dev/topics/db/models/#be-careful-wit... > > ). > > Thing is, I haven't been able to find any documentation on using the > > class name as a variable in this situation... > > > Any thoughts? > > Can you paste some of your code? It's my guess that the issue is that you > need to reapply the permalink decorator on the inherited models methods. > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---