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
22
votes
10 answers

How can I get the reverse url for a Django Flatpages template

How can I get the reverse url for a Django Flatpages template
Travis
  • 245
  • 1
  • 3
  • 8
14
votes
1 answer

Django flatpages backup?

I'm using flatpages in a site that I'm developing in a locally server. I need to backup the flatpage's data for use it in the final server. Does anyone know how to do it?
z3a
  • 1,014
  • 2
  • 11
  • 20
11
votes
3 answers

Why does django return 301 and 302 as server response codes after a user logs in and a flatpage is displayed?

I'm creating a django app. Users login and are shown a static web page that is managed by the flatpages app. Here are typical status messages from the dev server: [15/Aug/2013 18:43:16] "GET / HTTP/1.1" 200 1263 [15/Aug/2013 18:43:23] "POST /…
8
votes
4 answers

Django flatpages default site

mostly I use flatpages for one site (from sites framework). How can I mark existing site default for all created flatpages? It is waste of time every time to choose same site for every page created. Is there any way to override this in models or…
Ali Ismayilov
  • 5,727
  • 2
  • 22
  • 24
8
votes
2 answers

Extending Django Flatpages to accept template tags

I use django flatpages for a lot of content on our site, I'd like to extend it to accept django template tags in the content as well. I found this snippet but after much larking about I couldn't get it to work. Am I correct in assuming that you…
Tristan Brotherton
  • 2,533
  • 7
  • 32
  • 38
6
votes
2 answers

Access to field in extended flatpage in django

How to access field in extended flatpage in django? I wrote this: class ExtendedFlatPage(FlatPage): teaser = CharField(max_length=150) class ExtendedFlatPageForm(FlatpageForm): teaser = CharField(max_length=150) class Meta: …
Stan
  • 4,169
  • 2
  • 31
  • 39
6
votes
1 answer

Django.contrib.flatpages without models

I have some flatpages with empty content field and their content inside the template (given with template_name field). Why I am using django.contrib.flatpages It allows me to serve (mostly) static pages with minimal URL configuration. I don't have…
muhuk
  • 15,777
  • 9
  • 59
  • 98
5
votes
4 answers

Is there anything better than flatpages for Django?

I was wondering if there's anything better than the flatpages app for Django, because flatpages doesn't even support things like status (draft, published) or publish date. Is there anything out there?
rick
  • 4,103
  • 9
  • 37
  • 41
5
votes
2 answers

Specific templates for flatpages in Django

Is it possible to link specific templates for different flatpages in Django? For example: /about/ -> templates/flatpages/about.html /contact/ -> templates/flatpages/contact.html This is what I have but all these pages point to the…
Eeyore
  • 2,126
  • 7
  • 33
  • 49
4
votes
6 answers

Issue embedding TinyMCE in Django: the TinyMCE app wouldn’t show up in the browser

I’m working on a web application with Django, and I’m using the Flatpages app. Now, I’m trying to embed the TinyMCE WYSIWYG editor in Flatpages. I’m following the steps mentioned in the Apress book: Practical Django Projects. And I’ve done…
Omar
4
votes
3 answers

Reversible, named URLs for Django flatpages (or multilingual-ng)?

Is there a way to have reversible, named URLs for Django flatpages (or multilingual-ng, which is flatpages + translations)? If not, is there a similar app available which can have named URLs for pages which are editable through the admin? (And I'd…
aehlke
  • 15,225
  • 5
  • 36
  • 45
4
votes
3 answers

Django Direct_to_template or flatpages

Building a django app with some mostly static pages at the front of the site e.g. about.html faq.html that kind of thing I was looking at how urls.py work and I created this. ('(.+\.html)$', direct_to_template), It seems to do exactly what I…
Derek Organ
  • 8,323
  • 17
  • 56
  • 75
4
votes
5 answers

Django flatpages raising 404 when DEBUG is False (404 and 500 templates exist)

I'm using Django 1.1.1 stable. When DEBUG is set to True Django flatpages works correctly; when DEBUG is False every flatpage I try to access raises a custom 404 error (my error template is obviously working correctly). Searching around on the…
Adam
  • 41
  • 2
4
votes
3 answers

Django FlatPages vs Django-CMS

Without going into too much detail, I'm building a Django site and I wanted to implement a CMS solution, while having a lot of flexibility with page layouts, navigation, and organization. It'd be mainly used for our documentation, and so far I've…
KeyboardInterrupt
  • 3,483
  • 8
  • 36
  • 41
4
votes
1 answer

Change field in Django Flatpages Admin

Using Flatpages with the default admin, I need to change the template field from a text input with to select or radio with predefined choices. It's easy to do this with one of my own apps - just use the choices attribute in the model. I have tried a…
aptwebapps
  • 1,866
  • 1
  • 13
  • 17
1
2 3 4 5 6 7 8