frankban / django-endless-pagination Goto Github PK
View Code? Open in Web Editor NEWThis project is deprecated: please use https://github.com/shtalinberg/django-el-pagination
License: MIT License
This project is deprecated: please use https://github.com/shtalinberg/django-el-pagination
License: MIT License
Add the ability to retrieve those values from the PageList instance.
... and should provide a way to exclude integration ones.
Also, Selenium tests must be excluded by default when Python 3 is used.
The .live() method has been removed.
Hello,
I've been trying to load paginated data into table but it does not append the data correctly to the table (it's always outside).
Is this relevant for this application? Design decision needed.
When using AjaxListView, other GET kwargs than page
are removed when responding to the client.
Hi,
i am using twitter style django end less pagination on my website.
On the homepage, the endless pagination works fine and no problems there.
But on the different category page, it is loading the entire page on the second page just with second page items. I am clueless why it is happening only on the category pages and not on the homepage.
It looks like request.is_ajax() is not working when i scroll to second page and reloading the entire page.
Can anyone help?
Thanks
Django-nose must be ported to Python 3 before being able to do this.
This could be an interesting follow up for bug #1.
Reported by yiipeng, Jul 28, 2012
What steps will reproduce the problem?
What is the expected output? What do you see instead?
The expected URL is "/myurl/foo bar/end?page=2&querystring_key=page"
What version of the product are you using? On what operating system?
Django version 1.2.1
django-endless-pagination 1.1
jQuery 1.6.3 http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.js
Firefox 14.0.1
Windows 7
Please provide any additional information below.
The problem lies in endless.js at line: page_template.load($(this).attr("href"), data);
If I change to page_template.load(encodeURI($(this).attr("href")), data); it can work. The URL string becomes "/myurl/foo%20bar/end?page=2&querystring_key=page" However, I don't know if this is the correct fix.
I think the proper way may be creating URL in URI format. I looked a little bit into Django code. My URL with space is created using HttpResponseRedirect. Within HttpResponseRedirect, the url is encoded into URI format using iri_to_uri(). I also tried to encode it before constructing HttpResponseRedirect. It didn't change any. The URL string showing up in Firefox still contains spaces, instead of %20.
Does endless pagination support pagination for tables? It generates the code outside of the tables.
{% include page_template %}</tbody>
{% load endless %}
{% paginate object_list %}
{% for obj in object_list %}
<tr>
</tr>
{% endfor %}
{% show_more %}
Blocked on Django 1.5 release.
This works,
{% paginate 10 comment_list with "/firsat/comments/objectid/135/" %}
but, not this,
{% paginate 10 comment_list with "/firsat/comments/objectid/{{ firsatObject.id }}/" %}
I have to pass the current objects comments to the view so have to construct url dinamically,
thx
This is done in Django 1.5.
I haven't found a way to do this, so it would be great to have a way to programmatically disable endless pagination on a certain element.
In my use-case, I have several things that use endless-pagination on the same page, but since it's a tabbed interface, they're not all visible at the same time.
Since I'm using automatic pagination on scroll, I want to disable this feature for the paginated elements that are currently not visible.
Is there a way to do this?
Thanks!
I could use endless pagination but the thing I want is more complicated.
www.zergnet.com has an example of it.
There are 5 columns and everytime 15 records loaded and they are distrubuted among columns, I cant seem to be able to do that with django-endless-pagination.
Since I return a template which iterates all the records,
I need this template to iterate over 3 item and next iteration should be without those 3. This might be established with multiple requests or something? If my template was like https://dpaste.de/IrSD this one, there would be no problem at all, but this one more complicated.
thx
True if there are two pages or more.
Also document this new attr, adding a code snippet to the Digg-style examples.
Add ability to specify customized config in the paginate template tag.
For Python >= 3.3.
Hi,
I can't find a way to make the pagination default to the last page.
The {% paginate items starting from n %} is good but does not allow a simple way to get the last page.
A hint on this ?
Thanks.
Use xvfbwrapper to achieve the goal.
like this
context = self.get_context_data( object_list=self.object_list, page_template=self.page_template, **kwargs)
match.groupdict() in endless_pagination/templatetags/endless.py returns keys as unicode and python 2.6 does not support keywords arguments as unicode.
this line:
kwargs = match.groupdict()
should be like this(it converts key to str):
kwargs = dict([(str(key), value) for key, value in match.groupdict().items()])
Waiting for the Selenium Python wrapper to support Python 3.
How to set to the first load 40 objects?
And then by 10 objects?
Hi,
When i tried to install via pip, installs the incorrect version.
$pip install django-endless-pagination
Downloading/unpacking django-endless-pagination
Downloading django-endless-pagination-1.1.tar.gz
Running setup.py egg_info for package django-endless-pagination
Installing collected packages: django-endless-pagination
Running setup.py install for django-endless-pagination
Successfully installed django-endless-pagination
Cleaning up...
No package fixtures.
Layers support.
nose2_cov status?
Pagination is working if I go to some/url?page=X but {% show_pages %} is not doing anything and I am not getting any errors.
I have {% load endless %} and everything as the docs.
Any help would be appreciated.
Must:
Im trying to get all this markup
{% paginate object_list %}
{% for marathon in object_list %}
<p>
<h4><a class="link" href="{% url marathon_detail marathon.pk %}">{{ marathon.name }}</a></h4>
<i>{{ marathon.date }}</i>
<br/>
{{ marathon.details }}
</p>
{% if not forloop.last %} <hr /> {% endif %}
{% empty %}
<p>{% trans "No marathons found to display" %}</p>
{% endfor %}
<div class="pagination">
<ul>
{% show_pages %}
</ul>
</div>
to display only if there are pages to be shown
{% if is_paginated %}
<div class="pagination">
<ul>
{% show_pages %}
</ul>
</div>
{% endif %}
any ideas?
thanks in advance
The module contains more than one paginator.
Thank you for the great app!
The initial view of the page works fine, but once scrolled a the entire page contents are loaded into the endless_page_template div.
The relevant parts of my view are below. I'm using a CreateView because I have the comments form on the same page as the paginated comments.
class MyIndex(CreateView):
form_class = CommentForm
template_name = 'my/index.html'
page_template = 'my/comments.html'
def get_context_data(self, **kwargs):
context = super(MyIndex, self).get_context_data(**kwargs)
context.update({
'comments': Comment.objects.order_by('-id').filter(parent=None),
'page_template': self.page_template,
})
return context
The relevant parts of my/index.html template (main template)
<script src="/static/endless_pagination/js/endless-pagination.js"></script>
<script type="text/javascript">
$.endlessPaginate({
paginateOnScroll: true
});
</script>
<div class="endless_page_template">
{% include page_template %}
</div>
The relevant parts of my/comments.html (page_template)
{% load endless %}
{% paginate comments %}
{% for comment in comments %}
<span class="lead">{{ comment.name }}</span>
{{ comment.message}}
{% if not forloop.last %}
<hr />
{% endif %}
{% endfor %}
<br />
<div class="row-fluid">
<div class="span8 offset2 pagination-centered">
{% show_more %}
</div>
</div>
The only exception is Django itself.
hello all, i am using django-endless-pagination
i want to use bootstrap's pagination style, but i can not found how to define html tag
This way it should be possible to avoid excluding tests in Python 2.6.
Execute endlessPaginate (in the doc examples and in the development project) only when the DOM is fully loaded.
jjgionta wrote:
What steps will reproduce the problem?
What is the expected output? What do you see instead?
expected page to render. Key Error for context["request"]
What version of the product are you using? On what operating system?
Please provide any additional information below.
Issue is the endless_pagination seems to rely on context being present and context is not passes to custom template tags.
Since sending the context to registered templates is manually required, simply making this requirement clear in the getting started tutorials would bring clarity to any issues.
Use RequestContext.
Is there a way to pass custom template to show_more? I basically need it to use ajax pagination on a <table>
(adding more and more rows). The things is that show_more tag renders <div>
that cannot be inside table. I overrided the template on my project level, which I don't really like because I would like to have an option "how to render show_more".
With adaptive behavior.
This will take advantage of changes to be implemented in #12.
What to use? jquery-pjax, history.js, something else?
Make ENDLESS_PAGINATION_PAGE_LIST_CALLABLE accept also a 'path.to.my.callable' string.
In https://github.com/frankban/django-endless-pagination/blob/master/endless_pagination/static/endless_pagination/js/endless-pagination.js#L64 <String>.trim()
is used. Unfortunately this a JS 1.8 feature which causes it to not work in IE<9.
Each page list callable should be able to return "first" and "last" as placeholders to the first and last pages of digg pagination, represented as arrows.
This change includes:
I have in my template_list_page.html; < a href="{% url 'news_detail' news_id=news.id news_title=news.title|slugify %}" class="titled" title="{{ news.title|striptags }}">{{ news.title|truncatechars:50 }}< /a>
The class="titled" is for a tooltip plugin and let's say I have five posts then I press "Show more" and it show five more posts. The first five posts will have the tooltip working as it should but it doesn't work on the other fives.
mistake
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.