On 1 oct, 16:07, simon_saffer <simon.p.saf...@gmail.com> wrote: (snip) > My attempt at doing > this was to put the following in > urls.py in urlpatterns > > (r'^(?P<page>[a-zA-Z0-9]*?\.html?)$', 'mysite.views.showPage')
hint : named urls are cool > and then have a views.py in the mysite 'root' with the function is 'mysite' an app in your project, or is it the project itself ? > def showPage(request, page): hint: Python coding conventions : use all_lower names for functions > t = loader.get_template(page) > c = Context({}) > > return HttpResponse(t.render(c)) hint : use the render_to_response() hint : use RequestContext if you want your context processors to be of any use > How can I achieve something like this? Hmmm... What happened with your above attempt exactly ? I guess it didn't yield the expected results, but you don't tell what happened exactly (and when I mean "exactly", it means that if you got a traceback you should post the _whole_ traceback too). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.