perdy / apistar-crud Goto Github PK
View Code? Open in Web Editor NEWAPI Star CRUD resources
License: GNU General Public License v3.0
API Star CRUD resources
License: GNU General Public License v3.0
Hi, @perdy .
Thank you for writing this package. It looks really useful ๐
I'm actually wanting to use it in one of my projects, however, we use Django there.
I would like to contribute by adding or helping to add Django support. Unfortunately, I am not sure where to start. I've never really used the Django ORM outside of a pure Django project.
Where would a good place to start be?
Thank you ๐
In your framework it is implied that path /puppy/ would return the puppy resources, but instead I receive.
{"filters":"The \"filters\" field is required."}
In the Werkzueg routing documentation there is an option to set strict_slashes = False. The default behavior of apistar-crud is to add a trailing slash which is resulting in a number of 302 responses when I am trying to access the route. Could this framework support both styles?
Following the README.md but it looks like there are issues with the static resources used for delivering the admin functionality.
127.0.0.1 - - [25/Jul/2018 10:23:56] "GET /admin/ HTTP/1.1" 200 -
127.0.0.1 - - [25/Jul/2018 10:24:01] "GET /static/apistar_crud/styles.react.css HTTP/1.1" 404 -
127.0.0.1 - - [25/Jul/2018 10:24:01] "GET /static/apistar_crud/runtime~index.js HTTP/1.1" 404 -
127.0.0.1 - - [25/Jul/2018 10:24:01] "GET /static/apistar_crud/styles.react.js HTTP/1.1" 404 -
127.0.0.1 - - [25/Jul/2018 10:24:01] "GET /static/apistar_crud/vendors~index.js HTTP/1.1" 404 -
127.0.0.1 - - [25/Jul/2018 10:24:01] "GET /static/apistar_crud/index.js HTTP/1.1" 404 -
127.0.0.1 - - [25/Jul/2018 10:25:42] "GET /metadata/ HTTP/1.1" 404 -
Let's image I want to start an asynchronous task before the response of the create method. Do I have to override the entire classmethod annotated one?
Below an example for a task model
@classmethod
def add_create(
mcs, namespace: typing.Dict[str, typing.Any],
model, input_type, output_type
):
def create(
session: Config.session()["session"],
element: input_type
) -> output_type:
"""
Create a new element for this resource.
"""
record = model(**element)
session.add(record)
session.flush()
monitor_task.send(element.id)
return http.JSONResponse(output_type(record), status_code=201)
namespace["create"] = create
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.