fnp-django-pagination is a set of utilities for creating robust pagination
tools throughout a django application.
"""
-
-
-__version__ = (2, 2, 12, "final", 0)
if self.multiple_paginations and 'multiple_paginations' not in context:
context['multiple_paginations'] = True
- if context.get('page_suffix'):
- page_suffix = context['page_suffix']
- elif context.get('multiple_paginations') or getattr(context, "paginator", None):
- page_suffix = '_%s' % self.queryset_var
+ if context.get('multiple_paginations') or getattr(context, "paginator", None):
+ page_suffix = '_%s' % self.queryset_var
else:
page_suffix = ''
+++ /dev/null
-{% extends "django_testproject/base.html" %}
-{% load pagination_tags %}
-
-
-{% block content %}
-<p>This page demonstrates how autopaginate behaves under certain conditions</p>
-<p>Below you can see a list of {{ item_list|length }} items.</p>
-{% autopaginate item_list %}
-{% for item in item_list %}
-<p>Item {{item}}</p>
-{% endfor %}
-{% paginate %}
-{% endblock %}
+++ /dev/null
-{% extends "django_testproject/base.html" %}
-{% load pagination_tags %}
-
-
-{% block content %}
-<p>This page demonstrates how autopaginate behaves under certain conditions</p>
-<p>Below you can see two lists.</p>
-<p>First list has {{ first_item_list|length }} items.</p>
-{% autopaginate first_item_list 5 %}
-{% for item in first_item_list %}
-<p>{{item}}</p>
-{% endfor %}
-{% paginate using "pagination/custom_pagination.html" %}
-
-<p>Second list has {{ second_item_list|length}} items.</p>
-{% autopaginate second_item_list 5 %}
-{% paginate %}
-{% for item in second_item_list %}
-<p>{{item}}</p>
-{% endfor %}
-{% endblock %}
+++ /dev/null
-{% extends "pagination/pagination.html" %}
-
-
-{% block previouslink %}
- <p style="color: red; background-color: white;">This part is custom</p>
- {{ block.super }}
-{% endblock previouslink %}
+++ /dev/null
-# Copyright (c) 2010, 2011 Linaro Limited
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of the author nor the names of other
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from django.conf.urls.defaults import (
- patterns, url, include, handler500, handler404)
-
-urlpatterns = patterns(
- 'example.views',
- url(r'^list/$', 'list'),
- url(r'^complex-list/$', 'complex_list'))
+++ /dev/null
-# Copyright (c) 2010, 2011 Linaro Limited
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of the author nor the names of other
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from django.shortcuts import render_to_response
-from django.template import RequestContext
-
-
-def list(request):
- return render_to_response("example/list.html", {
- 'item_list': range(1000),
- }, RequestContext(request))
-
-
-def complex_list(request):
- return render_to_response("example/two_lists.html", {
- 'first_item_list': ["first list item %d" % item for item in range(1000)],
- 'second_item_list': ["second list item %d" % item for item in range(1000)],
- }, RequestContext(request))
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2010, 2011 Linaro Limited
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of the author nor the names of other
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import logging
-
-from django.core.management import execute_manager
-
-try:
- from fnp_django_pagination.test_project import settings
-except ImportError as ex:
- logging.exception("Unable to import application settings")
- raise SystemExit(ex)
-
-
-if __name__ == "__main__":
- execute_manager(settings)
+++ /dev/null
-# Copyright (c) 2010, 2011 Linaro Limited
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of the author nor the names of other
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import sys
-import os
-
-# Add this directory to path so that 'example' can be imported later
-# below. Without this the runner will fail when started via ``setup.py
-# test``
-sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
-
-from django_testproject.settings import gen_settings
-
-
-locals().update(
- gen_settings(
- INSTALLED_APPS=[
- 'example',
- 'fnp_django_pagination'],
- MIDDLEWARE_CLASSES=[
- 'fnp_django_pagination.middleware.PaginationMiddleware'],
- TEMPLATE_CONTEXT_PROCESSORS=[
- # Request processor needs to be enabled
- 'django.core.context_processors.request'],
- ROOT_URLCONF="fnp_django_pagination.test_project.urls"),
- TEMPLATE_LOADERS = ['django.template.loaders.app_directories.Loader'],
- SECRET_KEY = 'not for production',
- )
+++ /dev/null
-# Copyright (c) 2010, 2011 Linaro Limited
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of the author nor the names of other
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-def run_tests():
- from django_testproject.tests import run_tests_for
- run_tests_for("fnp_django_pagination.test_project.settings")
-
-
-if __name__ == '__main__':
- run_tests()
+++ /dev/null
-# Copyright (c) 2010, 2011 Linaro Limited
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of the author nor the names of other
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from django.conf.urls.defaults import (
- patterns, url, include, handler500, handler404)
-
-# Empty patterns so that test project can be started and would work normally
-urlpatterns = patterns('', url('', include('example.urls')))
+++ /dev/null
-#!/usr/bin/env python
-
-import django
-import os
-import sys
-
-from django.core.management import call_command
-
-
-def runtests():
- os.environ['DJANGO_SETTINGS_MODULE'] = 'fnp_django_pagination.tests.settings'
- django.setup()
-
- failures = call_command('test', 'fnp_django_pagination')
- sys.exit(bool(failures))
-
-if __name__ == '__main__':
- runtests()
+++ /dev/null
-DATABASES = {
- 'default': {
- 'NAME': ':memory:',
- 'ENGINE': 'django.db.backends.sqlite3',
- }
-}
-
-SECRET_KEY = 'fake-key'
-
-INSTALLED_APPS = (
- 'fnp_django_pagination',
-)
-
-TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'APP_DIRS': True,
- },
-]
--- /dev/null
+#!/usr/bin/env python
+
+import django
+import os
+import sys
+
+from django.core.management import call_command
+
+
+def runtests():
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'
+ django.setup()
+
+ failures = call_command('test', 'fnp_django_pagination')
+ sys.exit(bool(failures))
+
+if __name__ == '__main__':
+ runtests()
setup(
name='fnp-django-pagination',
- # Magic version handling with versiontools
- version=":versiontools:fnp_django_pagination:__version__",
+ version="2.2.13",
author='Zygmunt Krynicki',
author_email='zygmunt.krynicki@linaro.org',
description="fnp-django-pagination",
long_description=open("README.rst").read(),
keywords='pagination,django',
url='https://github.com/fnp/django-pagination',
- test_suite="fnp_django_pagination.tests.runner.runtests",
license='BSD',
- packages=find_packages(),
+ packages=find_packages(exclude=['tests*']),
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
],
- setup_requires=[
- 'versiontools >= 1.3.1'
- ],
include_package_data=True,
)
--- /dev/null
+{% extends "django_testproject/base.html" %}
+{% load pagination_tags %}
+
+
+{% block content %}
+<p>This page demonstrates how autopaginate behaves under certain conditions</p>
+<p>Below you can see a list of {{ item_list|length }} items.</p>
+{% autopaginate item_list %}
+{% for item in item_list %}
+<p>Item {{item}}</p>
+{% endfor %}
+{% paginate %}
+{% endblock %}
--- /dev/null
+{% extends "django_testproject/base.html" %}
+{% load pagination_tags %}
+
+
+{% block content %}
+<p>This page demonstrates how autopaginate behaves under certain conditions</p>
+<p>Below you can see two lists.</p>
+<p>First list has {{ first_item_list|length }} items.</p>
+{% autopaginate first_item_list 5 %}
+{% for item in first_item_list %}
+<p>{{item}}</p>
+{% endfor %}
+{% paginate using "pagination/custom_pagination.html" %}
+
+<p>Second list has {{ second_item_list|length}} items.</p>
+{% autopaginate second_item_list 5 %}
+{% paginate %}
+{% for item in second_item_list %}
+<p>{{item}}</p>
+{% endfor %}
+{% endblock %}
--- /dev/null
+{% extends "pagination/pagination.html" %}
+
+
+{% block previouslink %}
+ <p style="color: red; background-color: white;">This part is custom</p>
+ {{ block.super }}
+{% endblock previouslink %}
--- /dev/null
+# Copyright (c) 2010, 2011 Linaro Limited
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of the author nor the names of other
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+from django.conf.urls.defaults import (
+ patterns, url, include, handler500, handler404)
+
+urlpatterns = patterns(
+ 'example.views',
+ url(r'^list/$', 'list'),
+ url(r'^complex-list/$', 'complex_list'))
--- /dev/null
+# Copyright (c) 2010, 2011 Linaro Limited
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of the author nor the names of other
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+
+
+def list(request):
+ return render_to_response("example/list.html", {
+ 'item_list': range(1000),
+ }, RequestContext(request))
+
+
+def complex_list(request):
+ return render_to_response("example/two_lists.html", {
+ 'first_item_list': ["first list item %d" % item for item in range(1000)],
+ 'second_item_list': ["second list item %d" % item for item in range(1000)],
+ }, RequestContext(request))
--- /dev/null
+#!/usr/bin/env python
+# Copyright (c) 2010, 2011 Linaro Limited
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of the author nor the names of other
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+import logging
+
+from django.core.management import execute_manager
+
+try:
+ from fnp_django_pagination.test_project import settings
+except ImportError as ex:
+ logging.exception("Unable to import application settings")
+ raise SystemExit(ex)
+
+
+if __name__ == "__main__":
+ execute_manager(settings)
--- /dev/null
+DATABASES = {
+ 'default': {
+ 'NAME': ':memory:',
+ 'ENGINE': 'django.db.backends.sqlite3',
+ }
+}
+
+SECRET_KEY = 'fake-key'
+
+INSTALLED_APPS = (
+ 'fnp_django_pagination',
+)
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'APP_DIRS': True,
+ },
+]
--- /dev/null
+# Copyright (c) 2010, 2011 Linaro Limited
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of the author nor the names of other
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+def run_tests():
+ from django_testproject.tests import run_tests_for
+ run_tests_for("fnp_django_pagination.test_project.settings")
+
+
+if __name__ == '__main__':
+ run_tests()
--- /dev/null
+# Copyright (c) 2010, 2011 Linaro Limited
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of the author nor the names of other
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+from django.conf.urls.defaults import (
+ patterns, url, include, handler500, handler404)
+
+# Empty patterns so that test project can be started and would work normally
+urlpatterns = patterns('', url('', include('example.urls')))
[tox]
envlist=clear,
- d{21}-py{36,37}
- d{22,30,31}-py{36,37,38,39}
- d32-py{36,37,38,39,310}
- d40-py{38,39,310}
- d41-py{38,39,310,311}
- d42-py{38,39,310,311}
+ d{22,30,31}-py{38,39},
+ d{32,40}-py{38,39,310},
+ d41-py{38,39,310,311},
+ d42-py{38,39,310,311,312},
+ d50-py{310,311,312},
+ d51-py{310,311,312,313},
+ d52-py{310,311,312,313,314},
+ d60-py{312,313,314},
+ d61-py{312,313,314,315},
stats
[testenv]
-commands=coverage run --source=fnp_django_pagination --omit *runner*,*test_project* setup.py test
+commands=coverage run --source=fnp_django_pagination runtests.py
deps=
- d20: Django>=2.0,<2.1
- d21: Django>=2.1,<2.2
+ setuptools
d22: Django>=2.2,<3.0
d30: Django>=3.0,<3.1
d31: Django>=3.1,<3.2
d40: Django>=4.0,<4.1
d41: Django~=4.1.0
d42: Django~=4.2.0
+ d50: Django~=5.0.0
+ d51: Django~=5.1.0
+ d52: Django~=5.2.0
+ d60: Django~=6.0.0
+ d61: Django~=6.1.0
coverage
[testenv:clear]