Wednesday, 20 February 2013

Solved [No FlatPages matches the given query] #Django

After following most of the solutions provided, the most important factor you should consider that is not indicated in the django docs is that of SITE_ID = 1.

By default Django provides on the admin panel for Sites, "" . When adding flatpages one may tend to add his own site and most tutorials will dictate that you use SITE_ID = 1 on .

What the don't tell you is that "" site is by default 1. SO what you should do is edit the "" site to and there you have it.

Remember to also add

    # last entry in 
(r'', include('django.contrib.flatpages.urls')),`




  1. Oh, thank you, thank you, thank you! I was stuck on this for a long time. Editing in the sites table to did it for me.

  2. The problem also disturbed for more than a week and I decided to write this post because I noted there was no docs about it