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

How to customize flatpages to use with django-oscar get_model

Unfortunately, after countless attempts, I haven't found any promising way to solution. I'm searching for the least intrusive way to customize the flatpages used by django-oscar's 'dashboard.pages' app. It would be ok to break the migration history…
Frank
  • 1,959
  • 12
  • 27
0
votes
3 answers

Do i need to add URLs for flat pages in url.py in django

I have enabled flat pages in django and created page with url /pages/about so i want to know that do i need to create some url in url.py or not Because when i try http://ip:8000/pages/about it say page not found Also when i created page it asked me…
user1
  • 2,159
  • 3
  • 19
  • 19
0
votes
1 answer

Add a manager to FlatPage model in Django

I'd like to extend the FlatPage model in Django so that I can implement searching within its field. That's what I've done: models.py: from django.db.models import Q from django.contrib.flatpages.models import FlatPage class…
HBMCS
  • 686
  • 5
  • 25
0
votes
0 answers

setting permission for only one object using Django-guardian and Flatpages

I'm trying to use Django-guardian to apply permissions to specific flatpages. we have a number of flatpages on our site, and in most cases the django-auth works for what we need. However, we want to add object level permissions to some of the…
0
votes
1 answer

use jquery in Django Flatpages

can use jquery and jquery Ui in Django Flatpages ? should I host the files locally, or can I specify some external location ?? Thanks :)
Vamsi Krishna B
  • 11,377
  • 15
  • 68
  • 94
0
votes
2 answers

Using normal views and flatpages in a single Django app

Essentially, I have flatpages in my app, but I want to avoid creating the entire content within the flatpages table (the html is fairly long). Further, I need to access other models within this content. However, because flatpages requires from…
user3684314
  • 707
  • 11
  • 31
0
votes
1 answer

Setting flat pages in admin model

I just installed flat pages app for django and trying to create a flat pages from admin . So after I create a page in admin there is an option view on site and when I click on it I am getting Page not found what am I missing?When I set my name to…
Ilya Bibik
  • 3,924
  • 4
  • 23
  • 48
0
votes
2 answers

Flatpages equivalent for ASP.Net MVC

Django has the Flatpages app, which lets site admins change content on specific pages without changing code. Flatpage content i stored in the database, sort of like in a CMS. Flatpages are typically used for about-pages and such. Are there any good…
friism
  • 19,068
  • 5
  • 80
  • 116
0
votes
1 answer

Django Flatpage Giving 404 - But One Flatpage Works

Using Django 1.9, Python 3.4... Recently I modified my flatpages to take a custom field with the class_prepared approach: http://docs.djangoproject.com/en/dev/ref/signals/#class-prepared At this time, I already had one flatpage in the database at…
nicorellius
  • 3,715
  • 4
  • 48
  • 79
0
votes
1 answer

How to get a flatpage as a variable in views.py and pass it to another view?

I have some flatpages and I need to display it's content in a separate view. What I am doing right now is to get those flatpages by url in the actual view using something like: {% load flatpages %} {% get_flatpages '/about/' as about_pages…
carlosbvz
  • 163
  • 2
  • 14
0
votes
1 answer

How to export (create a migration) a flatpage (.txt) into a database?

I am using Django and created some flatpages via the admin panel, then I export them to my project in a .txt format using: python manager.py export_flatpages 1 > my_flat_page.txt Since I am working remotely, I need my peers to be able to quickly…
carlosbvz
  • 163
  • 2
  • 14
0
votes
1 answer

Django flatpages PAGE NOT FOUND No FlatPage matches the given query

I'm using django 1.1.3 and following along with a book called Practical Django Projects. I'm running into a problem editing the .urls file in my project folder and while creating a flat page on the admin site for my project. This is what I have in…
Bodhidarma
  • 519
  • 1
  • 7
  • 25
0
votes
0 answers

No installed app with label 'flatpages' Django

I am having a strange problem with flatpages 1 - My project was using django 1.3. In that, we copied django flatpages content and modified it for our needs. 2 - But now when we upgraded to django 1.7. In admin, console I am getting no installed app…
Anuranjit Maindola
  • 1,507
  • 1
  • 14
  • 30
0
votes
0 answers

Django multilingual app with flatpages

Which way is better to create a simple multilingual app with Django? I need just one or two flatpages and navigation. The problem is as follows: - Content and navigation panel on the page should be able to change from an admin-panel. - I need…
stk-13
  • 97
  • 1
  • 1
  • 8
0
votes
1 answer

Dynamic Flatpage per Model instance

I was wondering what would be the best way to create dynamic report documents (html) with Django. The data used for every report is stored in model instances which then gets passed to a html template which renders the report. The user should be able…
mzu
  • 759
  • 8
  • 20