Movatterモバイル変換


[0]ホーム

URL:


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

Handle reversal of non-API view_name in HyperLinkedRelatedField#2724

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@delinhabit
Copy link
Contributor

Thisfixes#2711

@lovelydinosaur
Copy link
Contributor

I wonder if we should handle this in a more generic way - eg in the reverse function...

https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/reverse.py#L18

Wrap thescheme.reverse in aNoReverseMatch block and fallback to the none-versioned approach there?

@delinhabit
Copy link
ContributorAuthor

Yeah, I think you are right. I'll try do do that.

@delinhabit
Copy link
ContributorAuthor

Moved the fallback logic toreverse and added tests around the new behavior in test_reverse.py

@lovelydinosaur
Copy link
Contributor

Excellent!

@lovelydinosaur
Copy link
Contributor

Stupidly I managed to miss this for the 3.1.1 release - apologies.
Merging now so it'll be in for 3.1.2.

lovelydinosaur added a commit that referenced this pull requestMar 23, 2015
…i-reversalHandle reversal of non-API view_name in HyperLinkedRelatedField
@lovelydinosaurlovelydinosaur merged commita90dbe3 intoencode:masterMar 23, 2015
@delinhabitdelinhabit deleted the namespaced-versioning-non-api-reversal branchApril 16, 2015 16:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

3.1.2 Release

Development

Successfully merging this pull request may close these issues.

Can't reverse non-API URLs with NamespaceVersioning

2 participants

@delinhabit@lovelydinosaur

[8]ページ先頭

©2009-2025 Movatter.jp