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
1 answer

Django flatpages

I am using Django flatpages and would like to implement some logic in a template based on a user session variable. eg. {% if session.my_var %} YES {% else %} NO {% endif %} Problem is that session object is not defined in flatpage context.
Alan Harper
  • 793
  • 1
  • 10
  • 23
0
votes
1 answer

Isn't it rough to retrieve flatpages via get_flatpages template tag from its url instead of a page identifier?

As you can read on the django reference or hacking a bit, get_flatpages can be used as follow: {% get_flatpages as flatpages %} {% get_flatpages for someuser as flatpages %} {% get_flatpages '/about/' as about_pages %} {% get_flatpages prefix as…
trinchet
  • 6,753
  • 4
  • 37
  • 60
0
votes
1 answer

Django App Data in Flatpages

I have a Django app called blogengine which does exactly what the name implies. I can't seem to get data from blogengine (posts) to display in templates when they're called by flatpages. I'm new to Django but I assume this is a urls.py issue. My…
frankV
  • 5,353
  • 8
  • 33
  • 46
0
votes
1 answer

Django simple-pages stable or not?

I want to create a pretty simple site with a few pages using Django. I guess I could use Wordpress. But there is some custom stuff (like a special kind of calendar app) that I rather do in Python than PHP. I came across simple-pages which seems like…
Niclas Nilsson
  • 5,691
  • 3
  • 30
  • 43
0
votes
1 answer

Serving an XML Django flatpage?

Is there any way to serve a flatpage with a mimetype of text/xml? Changing the template to one with a different file extension doesn't work, and I can't find any info in the documentation that says this is possible.
Randall Ma
  • 10,486
  • 9
  • 37
  • 45
0
votes
0 answers

osqa markdown and flatpages in admin

I have a markdown problem with OSQA and flatpages in admin. To be specific markdown is not recognized, i.e. instead of ** I just get as the output. Has anyone encountered the same problem?
Asterisk
  • 3,534
  • 2
  • 34
  • 53
-1
votes
1 answer

Django Apache2 mod_wsgi flatpages admin not working

I finally got apache2 with mod_wsgi working on Linux (havent much luck with windows :D) and everything works fine, but now when I added flatpages to my project, I found out that Apache doesn't seem to be aware of URL for admin when trying to create…
Lu.nemec
  • 484
  • 6
  • 10
-1
votes
1 answer

Django get_model method tries to get Django's Flatpages application instead of my Flatpages application

I have overrided the Django's Flatpages application and write my own Flatpages application. Django Oscar project is importing Flatpage Model with get_model method. FlatPage = get_model('flatpages', 'FlatPage') when i run development server python…
tuna
  • 6,211
  • 11
  • 43
  • 63
-1
votes
1 answer

include video in django flatpage

I've never worked with flat pages on Django (or Django at all, for that matter) but am required to create a new flat page and copy video object bits onto the new flat page. The video is in MP4 format, if that makes a difference. Does anyone have any…
nv39
  • 535
  • 2
  • 12
  • 21
1 2 3 4 5 6 7
8