On Fri, 2008-11-21 at 03:29 -0800, Caisys wrote: > Hi, > I would like to publish some statics files on my website and I have a > some questions: > 1- The flatpage app examples like http://www.lawrence.com/about/staph/ > contain elaborate html, is this edited as a text field in the admin > interface, wouldn't it be tedious to maintain?
Depends upon how complicated the page is and how often you're going to edit it. > 2- Can i do something like point all pages/(?P<page_name>\w+) to > mysite.views.page_serve and create a view page_serve that accepts the > page name as a parameter and reners_to_response a template with the > same name? > This way I can edit my static pages easily with my web development > app? > Is there anything wrong with doing the above. Absolutely nothing at all wrong with doing that. You might want to have a look at the direct_to_template view as well (see [1]) which provides a fairly nice shortcut for that sort of thing. But even your own very small view, if the generic one doesn't do everything you want is fine (and, I suspect, not at all uncommon. I use that pattern a fair bit). [1] http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-simple-direct-to-template Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---