Add 'page_kwarg' attribute to `MultipleObjectMixin`, removing hardcoded "page" #467

Merged
merged 4 commits into from Nov 17, 2012

Conversation

Projects
None yet
5 participants
@tomchristie
Member

tomchristie commented Oct 25, 2012

At the moment it's awkward to modify the generic views to use a custom name for the 'page' query parameter.

Includes documentation.

@mjtamlyn

This comment has been minimized.

Show comment Hide comment
@mjtamlyn

mjtamlyn Oct 25, 2012

Member

+1, needs a test as well though

Member

mjtamlyn commented Oct 25, 2012

+1, needs a test as well though

@apollo13

This comment has been minimized.

Show comment Hide comment
@apollo13

apollo13 Oct 25, 2012

Owner

We don't accept pull requests without the associated ticket beeing accepted. Is there a ticket? If yes please link it, if no, open one. Thx!

Owner

apollo13 commented Oct 25, 2012

We don't accept pull requests without the associated ticket beeing accepted. Is there a ticket? If yes please link it, if no, open one. Thx!

@tomchristie

This comment has been minimized.

Show comment Hide comment
@mjtamlyn

This comment has been minimized.

Show comment Hide comment
@mjtamlyn

mjtamlyn Oct 25, 2012

Member

Marked as RFC!

Member

mjtamlyn commented Oct 25, 2012

Marked as RFC!

@tomchristie

This comment has been minimized.

Show comment Hide comment
@tomchristie

tomchristie Nov 8, 2012

Member

Any chance of this making it in before the beta freeze?
Don't think there's anything contentious here, and the patch, tests and docs should cover everything.

Member

tomchristie commented Nov 8, 2012

Any chance of this making it in before the beta freeze?
Don't think there's anything contentious here, and the patch, tests and docs should cover everything.

+ expect either a ``page`` query string parameter (via ``request.GET``)
+ or a ``page`` variable specified in the URLconf.
+
+ .. attribute:: page_kwarg

This comment has been minimized.

Show comment Hide comment
@apollo13

apollo13 Nov 9, 2012

Owner

Misses a "versionadded 1.5" directive.

@apollo13

apollo13 Nov 9, 2012

Owner

Misses a "versionadded 1.5" directive.

@apollo13

View changes

docs/ref/class-based-views/mixins-multiple-object.txt
+ A string specifying the name to use for the page parameter.
+ The view will expect this prameter to be available either as a query
+ string parameter (via ``request.GET``) or as a kwarg variable specified
+ in the URLconf. Defaults to ``"page"``.

This comment has been minimized.

Show comment Hide comment
@apollo13

apollo13 Nov 9, 2012

Owner

There are two blanks, remove one. Also remove the " around page.

@apollo13

apollo13 Nov 9, 2012

Owner

There are two blanks, remove one. Also remove the " around page.

jezdez added a commit that referenced this pull request Nov 17, 2012

Merge pull request #467 from tomchristie/page-kwarg
Add 'page_kwarg' attribute to `MultipleObjectMixin`, removing hardcoded "page".

@jezdez jezdez merged commit 778b8bd into django:master Nov 17, 2012

@SmileyChris

This comment has been minimized.

Show comment Hide comment
@SmileyChris

SmileyChris Nov 21, 2012

Member

@jezdez, shouldn't this be pulled into 1.5.X if it has been marked as versionadded 1.5 ?

Member

SmileyChris commented Nov 21, 2012

@jezdez, shouldn't this be pulled into 1.5.X if it has been marked as versionadded 1.5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment