Questions tagged [django-flatpages]

Django flatpages app is a built-in application that allows to store “flat” HTML content in a database and handles the management for you via Django’s admin interface and a Python API.

Django comes with an optional flatpages application. It lets you store simple “flat” HTML content in a database and handles the management for you via Django’s admin interface and a Python API.

A flatpage is a simple object with a URL, title and content. Use it for one-off, special-case pages, such as “About” or “Privacy Policy” pages, that you want to store in a database but for which you don’t want to develop a custom Django application.

A flatpage can use a custom template or a default, systemwide flatpage template. It can be associated with one, or multiple, sites.

The content field may optionally be left blank if you prefer to put your content in a custom template.

114 questions
0
votes
2 answers

Urls with ".html" suffix in FlatPages

I FlatPages to display pages with .html suffix. When I try to create page with url like /about/policy.html I get error URL is missing a trailing slash. So, how can I make FlatPages use any url suffix I want? Now I have FlatPages middleware in my…
Dmitrii Mikhailov
  • 5,053
  • 7
  • 43
  • 69
0
votes
1 answer

Django Flatpages DB Tables Not Created

Ubuntu 14.04 Python 3.4.0 Django 1.7 I just followed the 4 step directions to set up flatpages, but when I ran python3 manage.py migrate, none of the DB tables for the flatpages were created. All the other tables were created, just not the ones…
Zamphatta
  • 4,634
  • 8
  • 30
  • 34
0
votes
0 answers

PythonSocial Auth Twitter flatpage

I'm trying to allow users on my Django website to login using Twitter and I'm using python social auth. It works fine locally, but when I deploy it to my server (AWS), I get this error: Environment: Request Method: GET Request URL:…
maahd
  • 672
  • 2
  • 9
  • 30
0
votes
1 answer

Django flatpages aren't registering to create FlatPageSitemap

I can't seem to get flatpages for my site to register, and therefore can't get my sitemap.xml for flatpages to work either. I have the following files: settings.py: MIDDLEWARE_CLASSES = ( ... …
YPCrumble
  • 26,610
  • 23
  • 107
  • 172
0
votes
2 answers

Django flatpages and a catchall startpage

I'm using django 1.1 and flatpages. It works pretty well, but I didn't manage to get a catchall or default page running. As soon as I add a entry to url.py for my startpage, the flatpages aren't displayed anymore. (r'^',…
cw.
  • 63
  • 1
  • 4
0
votes
3 answers

Can anyone describe how I implement the ckeditor in django.contrib.flatpages?

Can anyone describe how I implement the ckeditor in django.contrib.flatpages?
Aamir Hussain
  • 261
  • 3
  • 14
0
votes
0 answers

ImportError at /first-page/ cannot import name Flatpage

I am learning from Practical Django Projects 2nd Edition. When I start a new app named search like the examples in the book, I came across this problem. I don't know why I cannot import this name in the model Environment: Request Method: GET Request…
Marc
  • 3
  • 1
0
votes
2 answers

Django url routing with flatpages

I'm having real troubles understanding how url routing works in django when using flatpages and was hoping someone could take a look at my code and explain what I'm doing wrong. Also, it would be really helpful to have some advice on debugging this…
rix
  • 10,104
  • 14
  • 65
  • 92
0
votes
1 answer

How get access to flatpages from django-sitetree

Besides portfolio and blog, i have some flatpages in my site. Site tree, breadcrumbs and menu i passed through django-sitetree. And i cant understand how get URI of my flatpages from admin interface with django-sitetree app. With title it is OK -…
Raido
  • 63
  • 2
  • 6
0
votes
1 answer

Best way to fix django admin preview of flatpage attached to multiple sites

I have flatpage attached to multiple sites. Its admin preview chooses arbitrary site, which is quite obvious after debugging up to lines 35-36 of django.contrib.contenttypes.views.shortcut(). What would be the best way of fixing this problem? I…
Tomasz Zieliński
  • 16,136
  • 7
  • 59
  • 83
0
votes
1 answer

Django South Migration To Access Flatpages App

I am trying to access the Flatpages models in a South migration like so: s = orm['flatpages.Site'].objects.get(id=10) f = orm['flatpages.FlatPage'].objects.get(id=10) I get errors saying that site and flatpage models are not available in the…
Alex
  • 1,891
  • 3
  • 23
  • 39
0
votes
1 answer

django-breadcrumbs flatpages

I following this tutorials: https://github.com/chronossc/django-breadcrumbs/blob/master/README.markdown#3---enable-flatpages--breadcrumbs Like this, my settings.py: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', …
0
votes
1 answer

Django's Satchmo and flatpages issue

I'm having a problem with configuring Flatpages in Satchmo. I've used them before, in a pure django app, but now it just doesn't work, returning 301 http error when I'm trying to enter a flatpage-configured site. What I've done to configure…
Marcin Cylke
  • 2,100
  • 2
  • 21
  • 40
0
votes
2 answers

Can't get Google map to show up in Flatpage using Django Flatpages

I have a client with a "Directions" page in their website and they wanted to add a Google map to the page, so they went to maps and put in their location and then used the "embed" link to get the html for the iframe. They then opened up the Flatpage…
Shane
  • 851
  • 2
  • 6
  • 16
0
votes
1 answer

Filtering things out in template for loops

I've set up custom 403, 404, and 500 pages as flatpages. Obviously, I don't want these to show up in my navigation menu. Unfortunately, nothing I seem to do can get rid of them. I want something like: {% for page in flatpages %} {% if page.url…
swizzard
  • 1,037
  • 1
  • 12
  • 28