Actually, I would *avoid* modifying the flatpages source, but that does
raise a good point -- look at the source and copy/paste the Meta defined
inside the class, making the overrides you need in your subclass (redefine
the Meta).
You'll have to watch for changes if/when you switch django
Try to modify the flatpages source! You can find it directly in your
django installation.
--
Karim Gojux
www.karimblog.net
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To
The meta class instance is accessed through ClassName._meta -- not
ClassName.meta
I tried this when I got back last night and had (other) issues myself, so
this might not be the right approach anyway.
--
You received this message because you are subscribed to the Google Groups
"Django users"
Thanks Owen but is doesn't work. The similar Error message:
contribute_to_class
if self.meta:
AttributeError: 'Options' object has no attribute 'meta'
On Aug 30, 8:03 pm, Owen Nelson wrote:
> Sorry to be guessing here, but I was looking at something similar recently.
> My
Sorry to be guessing here, but I was looking at something similar recently.
My attempt (untested at this point) would be something like:
from copy import copy
class NewFlatpage(FlatPage):
_meta = copy(FlatPage._meta)
_meta.verbose_name_plural = "foo"
--
You received this message because
I was try
class Meta(FlatPage.Meta):
but when runserver there is following error:
AttributeError: type object 'FlatPage' has no attribute 'Meta'
any other solution to try?
Thanks
On Aug 30, 12:53 am, Steve Holden wrote:
> On 8/29/2010 6:51 PM, Goran wrote:
>
> >
On 8/29/2010 6:51 PM, Goran wrote:
> Thanks for the answer Steve. I'm Django and Python novice and here is
> what I was try. But it doesn't work.
>
> from django.contrib.flatpages.models import FlatPage
>
> class NewFlatpage(FlatPage):
>
> class Meta:
The Meta class would need to subclass
Thanks for the answer Steve. I'm Django and Python novice and here is
what I was try. But it doesn't work.
from django.contrib.flatpages.models import FlatPage
class NewFlatpage(FlatPage):
class Meta:
verbose_name_plural = "New_name"
On Aug 26, 4:39 am, Steve Holden
On 8/25/2010 8:26 PM, Goran wrote:
> I need another verbose_name_plural for Flat pages so i need to
> override class meta for it right? How can I do that?
>
[Caveat: this is a guess from general Python knowledge]
Have you tried creating a subclass of Flatpage, whose body simply
declares a Meta
I need another verbose_name_plural for Flat pages so i need to
override class meta for it right? How can I do that?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To
10 matches
Mail list logo