1
# With this, you can have an instant "community web site",
2
# letting your shell users publish data in secure ways.
4
# Just put this script anywhere, and /path/to/this/script/<user>/
5
# will publish a user's ~/public_html, and a .../<user>.twistd/
6
# will attempt to contact a user's personal web server.
8
# For example, if you put this at the root of the web server
9
# as "users.rpy", and configure --allow-ignore-ext, then
10
# http://example.com/users/<name>/ and http://example.com/users/<name>.twistd
11
# will work similarily to how they work on twistedmatrix.com
13
from twisted.web import distrib
15
resource = registry.getComponent(distrib.UserDirectory)
17
resource = distrib.UserDirectory()
18
registry.setComponent(distrib.UserDirectory, resource)