jarcoal / django-sliver Goto Github PK
View Code? Open in Web Editor NEWLightweight REST API built on top of Django's class-based generic views
License: BSD 3-Clause "New" or "Revised" License
Lightweight REST API built on top of Django's class-based generic views
License: BSD 3-Clause "New" or "Revised" License
Hi,
Really digging the lightweight approach of this. It is a nice change of pace from the heavy hitter like tastypie.
I was just wondering about Generic relations support, e.g. GenericForeignKeys (https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1)
Is it planned for future versions? Any work arounds?
in line 139 of sliver/views.py:
exclude = exclude or []
Should be something like:
exclude = exclude or self.exclude
I'm sorry for not making a pull request for this but.
There is probably a typo which raises an error about the URIMixin
URI should be capitalized:
https://github.com/jarcoal/django-sliver/blob/master/sliver/mixins.py#L101
data = super(URIMixin, self).dehydrate(model, fields, exclude, relationship_prefix)
In the future I'll correctly fork and make pull requests not just describe the problems. Great job on this nice clean library!
For example, a JSONMixin with a ResourceClass will return an HttpResponse of the "text/html" type, when it should be "application/json".
This is a quick fix:
def render_to_response(self, context, status=200):
""" Out to the tubes...
"""
return HttpResponse(self.render(context), mimetype="application/json", status=status)
But each mixin should probably report its own mimetype, which the render_to_response() method could respect.
We're interested in evaluating the software, but can't find licensing information anywhere. If you really want this to be open source, please attach a license to it. Best would be a combination of:
Either one will do in a pinch, but both are best.
But we (at Disney Animation) cannot even establish an evaluation of the software without some kind of indication of copyright/licensing.
Kevin
Technology Manager
Walt Disney Animation Studios
I bumped the version number to 0.1.1, and did a test publication to TestPI, but I don't have permission to publish to the main index. Would you mind? ๐
Looks like I don't have permission to flip the switch: https://travis-ci.org/jarcoal/django-sliver
Currently decoding fails on dehydrate with unicode strings.
To allow unicode strings please
val = str(val)
to
val = unicode(val)
https://github.com/jarcoal/django-sliver/blob/master/sliver/views.py#L104
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.