Code Monkey home page Code Monkey logo

apistar-crud's People

Contributors

gherrero avatar perdy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

apistar-crud's Issues

/admin/ returns 404s for static resources

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 -

Question: how to customize a method

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

Django Support

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 ๐Ÿ˜„

filters required.

In your framework it is implied that path /puppy/ would return the puppy resources, but instead I receive.

{"filters":"The \"filters\" field is required."}

Trailing slash option

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.