Alright, then I'll use Twisted's built-in! But I still have my same question: Should I write a separate file containing all the resources and another file with the server? To deploy a content server on the RPi, do I need to wrap all the files within a .tac file?

Joelle


On Wed, Jun 19, 2013 at 8:24 PM, Glyph <glyph@twistedmatrix.com> wrote:

On Jun 19, 2013, at 2:21 PM, Jo as Queeniebee <joasqueeniebee@gmail.com> wrote:

This is great, thanks.

I want to deploy a content server on my Raspberry Pi, do I need to write a separate file for the server/reactor that imports views.py and config.py?

Given that on a raspberry pi you might be somewhat resource-constrained and concerned about overhead of code resources, have you considered using Twisted's built-in template engine?

<http://twistedmatrix.com/documents/current/web/howto/twisted-templates.html>

You can certainly use Jinja2 with Twisted, but given that Twisted might load this to render some of its own internal content (like directory listings) it might be worthwhile to give it a try.

-glyph

_______________________________________________
Twisted-web mailing list
Twisted-web@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web