Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Incorrect resource type on inverse proxy models? #285

Closed
@dolgafar

Description

Hello,

I've used the proxy model approach as suggested in #166, this works nicely and you can even assign different permissions to resources based on this in Django.

But when I use the inverse relation (related_name), the resource name is taken from the "base model" and not the proxy model. Normally it would use the JSONAPI meta on the proxy model, but this can't be used in this case.

Does it make sense? :) I should say, I'm quite new to drf json-api, but it rocks really well with Ember.

I've removed the inverse relation field for now, because it confuses Ember data, but I loose a lot of finesse and included data option.

Could it be possible to set resource_name manually on the ResourceRelatedField ? Or is there some other smart way I haven't figured out?

Thanks a lot for a great package...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /