Snippet List
This is a XML-RPC server, that uses arguments in URLs and every dispatcher instance is prepared in memory during webserver run. It's good, for example, for securing XML-RPC server with hashed strings and there are a lot of similar use cases.
Usage:
from xmlrpclib import ServerProxy
server = ServerProxy('http://example.com/xmlr-rpc/%s/' % something, allow_none=True)
server.do_something(*args)
- xml
- server
- dispatcher
- xmlrpc
You have to put this code in your *searchengines* Firefox folder in a file called **djangosnippets.xml**
After restarting Firefox, you will be able to seek DjangoSnippets very easily.
I also create a favicon.ico since djangosnippets.org didn't have one ...
Path example : /usr/lib/iceweasel/searchplugins/djangosnippets.xml
- xml
- firefox
- djangosnippets
- searchengine
Django's serializer has some limitations which makes it a bit of a pain to use. Basically it will ignore any atributes that have been added to a model object.
The code below is for an alternative serializer. This version allows you select what attributes will be serialized on a per object basis. It also allows you to either serialize the data into json or xml.
The original json encoder was written by [Wolfram Kriesing](http://wolfram.kriesing.de/blog/)
Example Usage:
dumper = DataDumper()
dumper.selectObjectFields('class_name',[...fields...])
dumper.selectObjectFields('class_name',[...fields...])
dumper.dump(model_instance,'xml')
dumper.dump(model_instance,'json')
dumper.dump(queryset,'xml')
4 snippets posted so far.