'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'django.contrib.flatpages',
)
TEMPLATE_DIRS = (
'/var/www/html/tamada2/templates',
)
template for flatpages: /var/www/html/tamada2/templates/flatpages/
default.html
###
{% extends "base.xhtml" %}
{% block content %}
<p class="about-text">{{flatpage.content}}</p>
{% endblock %}
On 31 янв, 08:10, Adi <aditya.rus...@gmail.com> wrote:
> Hi:
> I am trying to use flatpages in my app, and i set up the settings.py
> correct, and I am able to create the flatpages using the admin site.
>
> However, when in my app I try to load the template tags for flatpages
> using:
> {% load flatpages %}
>
> I get a
> TemplateSyntaxError
> Exception Value:
>
> 'flatpages' is not a valid tag library: Template library flatpages not
> found, tried
> django.templatetags.flatpages,django_extensions.templatetags.flatpages,django.contrib.admin.templatetags.flatpages,django.contrib.webdesign.templatetags.flatpages
>
> I then looked to see the django distribution installed (1.2.3 final)
> on my computer and noticed that django.contrib.flatpages did not have
> a templatetags module under that.
>
> I looked up the code repository for 1.2.3 and 1.2.4 and both don't
> have the templatetags directory.
>
> What am I doing wrong ? What is missing ?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment