Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional pagination #135

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

izimobil
Copy link
Contributor

By default, message list is not paginated, but now one can enable pagination
by setting DJANGO_MESSAGES_PAGE_LENGTH to a positive integer.

Pagination is disabled if this setting variable is not defined or set to -1.

When not using the Django sites framework, you get a RuntimeError
because it is not installed, even if you set DJANGO_MESSAGES_NOTIFY to
False.

This can be avoided by importing the site model only when necessary.
By default, message list is not paginated, but now one can enable pagination
by setting ``DJANGO_MESSAGES_PAGE_LENGTH`` to a positive integer.

Pagination is disabled if this setting variable is not defined or set to -1.
Paginator.get_page() is only available in django >= 2.0, let's use
Paginator.page() instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant