http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/
Hmm.... that doesn't work properly.
What is the correct way to set up urls when you add flatpages? If you
add the flatpage urlpattern match to the end of ./shop/urls.py you can
no longer view products if you use the base_index.html template as
products are not contained within that shop/url.py so of course it
doesn't find a match before hitting the flatpage include....
many thanks for any help,
Stjohn
Hi Bruce,
excellent advice. I will follow it, many thanks. I added the relevant
urlpatterns as you described to ./mystore/urls.py and created the
necessary html files which worked great. I tested out your flatpage
urlpattern in the same way and that also works great.
I am not sure what you mean by 'use the SHOP_URLS pattern in your
settings file' - should the above patterns go into my ./mystore/
settings.py and not ./mystore/urls.py?
With reference to your 'starting a new store real world project
layout' I was able to follow all the great advice apart from the 'url
layout' part and the 'install the site app'. I now understand what you
are saying but I think you might have made a couple of small mistakes
(of course I could easily be misunderstanding!).
storename/
__init__.py
local_settings.py
manage.py
settings.py
bin/
(here are various scripts you may use for testing or whatever)
etc/
init.d/
storename
sysconfig/
storename
fixtures/
site/
__init__.py
models.py
templatetags/
__init__.py
static/
css/
images/
js/
templates/
storename/
Thanks so much,
Shakthi
Hi Bruce,
I created a project as outlined in your blog post. It works very well but I couldnt understand the uses of different folders, except for the templates folder. Please can you explain why I would need these folders (marked in yellow, the who /etc folder with all its content) and how I can use them as intended?
storename/
__init__.py
local_settings.py
manage.py
settings.py
bin/
(here are various scripts you may use for testing or whatever)
etc/
init.d/
storename
sysconfig/
storename