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

Allow HTML to render when no filter_class is defined.#3560

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

Merged

Conversation

@ericholscher
Copy link
Contributor

Previously it required a filter_class,
or else it would error when callingcls().
This now sets thefilter context toNone
if one does not exist.

Thisfixes#3559

Previously it required a filter_class,or else it would error when calling `cls()`.This now sets the `filter` context to `None`if one does not exist.Fixesencode#3559
@ericholscher
Copy link
ContributorAuthor

Not sure what the best way to test this is, happy to add tests if someone points the way.

@jpadillajpadilla added the Bug labelOct 28, 2015
@jpadillajpadilla added this to the3.3.1 Release milestoneOct 28, 2015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As a general note/nitpick can we go ahead and also make this look like thefilter_query() method on top, basically just renamingcls forfilter_class.

@jpadilla
Copy link
Contributor

@ericholscher thanks for putting this together, looks good to me. We were already doing a similar check on thefilter_queryset() method on top of that one. HTML rendering for filters has no tests that I know of yet, so I wouldn't really worry about it.

@jpadilla
Copy link
Contributor

@ericholscher also I'm wondering what does that rendered HTML looks like with no filter sincebothfilter templates usefilter.form from context.

@lovelydinosaur
Copy link
Contributor

happy to add tests if someone points the way.

An example, along with screenshots demonstrating the behavior in theNone case would prob be first point of call. We could figure out a sensible test case following on from that.

@lovelydinosaur
Copy link
Contributor

Gonna accept this for now, given bug fix nature of the 3.3.1 release.
Thanks@ericholscher!

lovelydinosaur added a commit that referenced this pull requestNov 4, 2015
Allow HTML to render when no filter_class is defined.
@lovelydinosaurlovelydinosaur merged commit95f92e9 intoencode:masterNov 4, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

3.3.1 Release

Development

Successfully merging this pull request may close these issues.

Viewsets without a filter_class break Browser Viewer

3 participants

@ericholscher@jpadilla@lovelydinosaur

[8]ページ先頭

©2009-2025 Movatter.jp