Forum How do I...?

Use Prince in Django

rldoan
Does anyone know if Prince can be called from within a Django app? I'd appreciate a code snippet if anyone has one.

Also, I looked at the use of the Python wrapper in the User Guide, and it was not apparent how to specify the css that's to be used in the call. How do you specify the css file or string? Thanks.
mikeday
You can specify a CSS file on the command-line with --style=FILE.CSS, this can be passed as one of the arguments to Popen when calling Prince from Python.