>
> I cannot get the subclassing method to work. I have created an app
> "author" added it to the installed app section of the setting.py file. I
> have tried to follow the information from the mezzanine documents on
> subclassing but I do not see it on my http://127.0.0.1:8000/admin/ page.
>
Here is my author/models.py file
from django.db import models
from mezzanine.pages.models import Page
> # The members of Page will be inherited by the Author model, such
# as title, slug, etc. For authors we can use the title field to
# store the author's name. For our model definition, we just add
# any extra fields that aren't part of the Page model, in this
# case, date of birth.
> class Author(Page):
dob = models.DateField("Date of birth")
> class Book(models.Model):
author = models.ForeignKey("Author")
cover = models.ImageField(upload_to="authors")
Here is my author/admin.py file.
> from django.contrib import admin
>
> from mezzanine.pages.admin import PageAdmin
>
> from .models import Author
>
>
>> admin.site.register(Author, PageAdmin)
>
>
>
I would appreciate any nudge or kick in the correct direction. Or if there
is an example app on subclassing out there. I have searched but could not
find one.
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.