Skip to content

Instantly share code, notes, and snippets.

@beniwohli
Created July 27, 2012 12:33
Show Gist options
  • Save beniwohli/3187713 to your computer and use it in GitHub Desktop.
Save beniwohli/3187713 to your computer and use it in GitHub Desktop.
SELECT "cms_title"."id",
"cms_title"."language",
"cms_title"."title",
"cms_title"."menu_title",
"cms_title"."slug",
"cms_title"."path",
"cms_title"."has_url_overwrite",
"cms_title"."application_urls",
"cms_title"."redirect",
"cms_title"."meta_description",
"cms_title"."meta_keywords",
"cms_title"."page_title",
"cms_title"."page_id",
"cms_title"."creation_date",
"cms_page"."id",
"cms_page"."created_by",
"cms_page"."changed_by",
"cms_page"."parent_id",
"cms_page"."creation_date",
"cms_page"."changed_date",
"cms_page"."publication_date",
"cms_page"."publication_end_date",
"cms_page"."in_navigation",
"cms_page"."soft_root",
"cms_page"."reverse_id",
"cms_page"."navigation_extenders",
"cms_page"."published",
"cms_page"."template",
"cms_page"."site_id",
"cms_page"."moderator_state",
"cms_page"."level",
"cms_page"."lft",
"cms_page"."rght",
"cms_page"."tree_id",
"cms_page"."login_required",
"cms_page"."limit_visibility_in_menu",
"cms_page"."publisher_is_draft",
"cms_page"."publisher_public_id",
"cms_page"."publisher_state",
"django_site"."id",
"django_site"."domain",
"django_site"."name"
FROM "cms_title"
INNER JOIN "cms_page" ON ("cms_title"."page_id" = "cms_page"."id")
INNER JOIN "django_site" ON ("cms_page"."site_id" = "django_site"."id")
WHERE ("cms_page"."publisher_is_draft" = FALSE
AND "cms_page"."site_id" = 1
AND NOT ("cms_title"."application_urls" IS NULL)
AND NOT (("cms_title"."application_urls" =
AND "cms_title"."application_urls" IS NOT NULL)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment