Alessandro wrote:
I have used the django template system to generate web pages independent of a django project.I need to include some django output in other web pages. The problem is that Sometimes I cannot use server side includes on the other side, and I don't know how to do.I thought maybe some javascript or ajax to include with a <script> in the destination page, but how can I do it? Must I write a javascript with document.write on the django side or can I import the html output directly with a javascript and a browser side include? Do you have any examples?
First I created a settings.py that only has the TEMPLATE_DIRS setting. Next, I created my template.Last, I created a cgi script that loads and renders my template. I used a more generic python CGI module to handle post data.
If you don't want to use the django template system exclusively, consider using an iframe for a "browser side include".
Cheers! Jeff Anderson
signature.asc
Description: OpenPGP digital signature