1. David Wolever
  2. django-amf-gateway


django-amf-gateway /

Filename Size Date modified Message
113 B
A bit more bookkeeping
1.0 KB
Adding a setup.py
90 B
Whoops, fixing MANIFEST.in
1.6 KB
Updating Django example and README a bit more.
1.4 KB
Hopefully fixing setup.py

django-amf-gateway makes it easy for Django apps to provide AMF services.

After PyAMF[0] is installed, only five steps are required to setup an AMF gateway:

0: Put the 'django_amf_gateway' directory somewhere in $PYTHONPATH

1: Add an enty to INSTALLED_APPS:

... 'django_amf_gateway', ...


2: Set AMF_NAMESPACE in settings.py:

AMF_NAMESPACE = "my_namespace"

2: Add two URLs to urls.py:

(r'^gateway/', 'django_amf_gateway.amf_gateway'), (r'^crossdomain.xml$', 'django_amf_gateway.render_crossdomain'),
3: Create the file 'amf_service.py' in every application you want to


from django_amf_gateway import register_amf_service from . import models as m

class EchoService(object):
def echo(self, arg):
return arg
def spamWithEggs(self, eggs):
s = m.Spam() s.eggs = eggs return s

register_amf_service('echo', EchoService, [ m.Spam ])

And you're done!

You can see the django_example directory to see an example of a working Django server, and the flex_example directory for a Flex client.

= Options

kwargs which will be passed to DjangoGateway.

A namespace which will be used for all classes registered with the classes argument to register_amf_service. The default is {}. A possible value is:

'strict': False, 'expose_request': False, 'logger': logging,


[0]: http://pyamf.org/