On Dec 29 2009, 1:44 pm, Durbin <neildur...@gmail.com> wrote:
> very cool! any plans to integrate it fully into the django templating
> system?

Glad you like it.

Amit Upadhyay has written a loader here:

http://github.com/amitu/dutils/blob/master/dutils/shpaml_loader.py

I've used shpaml mostly with django, but for my own use cases, I
prefer light integration, so I publish from shpaml to django outside
of django itself.

This is the script I use; it should be fairly straightforward to
modify it for more complicated template directory structure schemes:

    from shpaml import convert_text
    import os
    import glob

    def publish():
        os.system('rm -f templates/*.html')
        for fn in glob.glob('templates/*.shpaml'):
            out_fn = fn.replace('.shpaml', '.html')
            open(out_fn, 'w').write(convert_text(open(fn).read()))

    if __name__ == '__main__':
        publish()

If you are interested in shpaml, please join the mailing list here:

http://groups.google.com/group/shpaml

Since this announcement, there has been a port of shpaml to
Javascript.  Thanks to the Javascript implementation, you can see a
WYSIWYG demo of shpaml here:

http://kp.hcoop.net/kp/doc/tip/shpaml/js/demo.html

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

Reply via email to