On 10/17/06, Rachel Willmer <[EMAIL PROTECTED]> wrote:
> Is it possible to include PHP code in the Django templates?

Well.

It's probably possible, just not pretty. One thing you might do is
write a custom template loader which calls out to /usr/bin/php and
runs PHP over the contents before returning the Template object for
Django to work with, but that would probably be quite a bit of work.

Another option, and maybe a nicer one, would be to look at the work
Ian Bicking has been doing recently to produce a gateway that lets PHP
apps speak WSGI; he's got an experimental "PyWordpress" that runs
Wordpress under WSGI: http://blog.ianbicking.org/pywordpress.html

Finally, you could ditch WP entirely and use inspectdb +
django.contrib.admin to manage the blog, and do all the templating via
Django, but of course you'd lose (or have to re-implement) any WP
templating features you were relying on.

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to