Now I get all kinds of 404 errors.  I guess I'm missing something in
my understanding of flatpages.  I was going to place all my html pages
into flatpages, including the home page.  How does all that work
without using URLs and views?

On May 12, 10:42 am, Daniel Roseman <[email protected]>
wrote:
> On May 12, 6:13 pm, Jesse <[email protected]> wrote:
>
>
>
> > Hello,
>
> > I'm using tiny_mce with flatpages in the admin.  I can get the
> > template to appear with the extended CSS, but not the flatpage
> > contents of the page.
> > My flatpage in admin is:
> > URL:  /
> > Content:  much text that is not appearing in the template.
>
> > The template:
> > ...templates/flatpages/default.html:
> > {% extends "base.html" %}
> > {{ flatpage.content }}
>
> > url.py
> >     (r'^$', default),
>
> > View.py
> > def default(request):
> >   return render_to_response('default.html', RequestContext(request))
>
> > What am I missing?  Thx
>
> You're defining a view that renders a template, but don't pass any
> context to it, so naturally it is not populated.
>
> If you want to use flatpages, you don't define a view - the flatpage
> renderer is called when the URL is not found in urls.py. So delete the
> 'default' view from your urls and views, and it should work.
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to