New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple JSONRPCSites are not supported #13
Comments
hello, The defect was corrected associated with multiple sites and added an example[1]. Verify that this partial solution solves your problem. Thank you. [1] - https://github.com/cenobites/flask-jsonrpc/tree/master/examples/multiplesite |
Hi @rayrapetyan, The fact, MethodViews is better than the current implementation. Thanks! |
Thanks for prompt reply, your fix solved the problem! I'm a Python newbie, how to make it available through pip? pip install flask-jsonrpc installs some old version. |
I have to generate a new version of flask-jsonrpc and submit to pip, but before need to fix problem with MethodViews and Web Browsable API. You can upgrade your local release:
|
Thank you so much for your help! On 2/28/2014, 2:54:11 PM, Nycholas de Oliveira e Oliveira wrote:
|
The new version will be performed when the issue is resolved #12. Thanks. |
Fix cenobites#13 "decoding Unicode is not supported"
_site_api always uses default_site, so you can't define separate JSONRPCSites for different JSONRPC instances, which means you can't use different URL paths accepting JSON queries with same method names (which may be very useful in REST apps handling many similar clients).
However, this issue is easy to fix - all you need is wrap "_site_api" to "View" class, define "dispatch_request" method which accepts "site" as param, and rewrite "add_url_rule"s, (use unique "endpoints" and pass self.site to View constructor).
I can provide this patch, but my version (installed from pip) differs from master branch.
The text was updated successfully, but these errors were encountered: