Hi,
I am running into the same issue -
django.db.utils.ProgrammingError: relation "pages_page" does not exist
Could you let me know how you ended up sorting this ?
I am so stuck on this and have been here for a week...
Thanks for your help.
Regards,
Aarthi
On Tuesday, January 6, 2015 at 11:11:48 PM UTC+1, Avery Laird wrote:
>
> Hello,
>
> I ran into an issue while trying to create a test database:
>
> django.db.utils.ProgrammingError: relation "pages_page" does not exist
>
> I have an theme app (called theme) that uses the mezzanine page model, so
> I assume it must have something to do with that; sure enough, the top of
> the traceback includes a failed SQL operation involving the table
> theme_homepage,homepage being a model in my theme app that inherits from
> mezzanine.pages.models.Page. To see if my hunch is correct, I change the
> order of my installed apps to have mezzanine.pages before theme. Sure
> enough, when running python manage.py test the error is now:
>
> django.db.utils.ProgrammingError: relation "pages_page" already exists
>
> I know there must be some overlap between apps causing the issue, one
> which I fixed before by fiddling with south. The problem is, I can't fiddle
> with a test database, and at any rate I would rather do things the right
> way then have a fragile database. The models.py from theme is included
> below:
>
> from django.db import models
> from django.utils.translation import ugettext_lazy as _
>
>
> from mezzanine.core.fields import FileField, RichTextField
> from mezzanine.core.models import RichText, Orderable, Slugged
> from mezzanine.pages.models import Page
> from mezzanine.utils.models import upload_to
>
>
> class HomePage(Page, RichText):
> """
> The homepage
> """
> header = models.CharField(max_length=140)
> subheader = models.CharField(max_length=140)
> splash = FileField(verbose_name=_("Splash Image"),
> upload_to=upload_to("theme.HomePage.splash", "splash"),
> format="Image", max_length=255, null=True, blank=True)
>
>
> class Meta:
> verbose_name = _("Home Page")
> verbose_name_plural = _("Home Pages")
>
> class Slide(Orderable):
> '''
> Homepage slider images
> '''
> homepage = models.ForeignKey(HomePage, related_name="slides")
> image = FileField(verbose_name=_("Image"),
> upload_to=upload_to("theme.Slide.image", "slider"),
> format="Image", max_length=255, null=True, blank=True)
>
>
> class ExtendedBlog(Page, RichText):
> """
> RichText page, but with an optional splash image
> """
> splash = FileField(verbose_name=_("Splash Image"),
> upload_to=upload_to("theme.ExtendedBlog.splash", "splash"),
> format="Image", max_length=255, null=True, blank=True)
>
>
> class Meta:
> verbose_name = _("Extended Blog")
> verbose_name_plural = _("Extended Blogs")
>
>
> Thanks for any ideas/help!
>
> Cheers,
>
> Avery
>
>
>
--
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/d/optout.