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

Render with Context, instead of RequestContext #74

Open
zhang-z opened this issue Sep 8, 2014 · 0 comments
Open

Render with Context, instead of RequestContext #74

zhang-z opened this issue Sep 8, 2014 · 0 comments

Comments

@zhang-z
Copy link

zhang-z commented Sep 8, 2014

hi guys, thanks for the great package. I want to suggest one improvement:

Referring to the last line of "endless_pagination/models.py/EndlessPage.unicode":

return template.render(RequestContext(self._request, context))

The EndlessPage object renders with RequestContext. Under this implementation, all context_processors are executed many times in a view. In my project, one context_processor even hits DB. This is a significant cost. As I saw, neither "current_link.html" nor "page_link.html" is using "request". So I think simply replacing RequestContext with Context will be an improvement.

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

No branches or pull requests

1 participant