From 8a0d2b3997350e053debfba37eb731dd7cdb90a9 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 20 Jun 2023 04:07:06 +0000 Subject: automatic import of python-django-cool-pagination --- .gitignore | 1 + python-django-cool-pagination.spec | 396 +++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 398 insertions(+) create mode 100644 python-django-cool-pagination.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..5a77660 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/django-cool-pagination-0.3.0.tar.gz diff --git a/python-django-cool-pagination.spec b/python-django-cool-pagination.spec new file mode 100644 index 0000000..7f306e4 --- /dev/null +++ b/python-django-cool-pagination.spec @@ -0,0 +1,396 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-cool-pagination +Version: 0.3.0 +Release: 1 +Summary: Simple pagination app that saves your time. +License: MIT +URL: https://github.com/joe513/django-cool-pagination +Source0: https://mirrors.aliyun.com/pypi/web/packages/df/3f/f4d24622d5b7c57e8cff246cf6052e7f51a1f985d9bb4f574fb3a533e107/django-cool-pagination-0.3.0.tar.gz +BuildArch: noarch + + +%description +# django-cool-pagination + +[![Build Status](https://travis-ci.org/joe513/django-cool-pagination.svg?branch=master)](https://travis-ci.org/joe513/django-cool-pagination) +[![Coverage Status](https://coveralls.io/repos/github/joe513/django-cool-pagination/badge.svg?branch=master)](https://coveralls.io/github/joe513/django-cool-pagination?branch=master) +[![PyPI version](https://badge.fury.io/py/django-cool-pagination.svg)](https://badge.fury.io/py/django-cool-pagination) + +*django-cool-pagination* is simple pagination app that saves your time. + +## WARNING: + **The project is still on development stage, some things may not work properly.** + + + + +## Prerequisites +Currently it supports Bootstrap 4.x only. So that you have to add [Bootstrap4](https://getbootstrap.com/docs/4.1/getting-started/download) to your project.
+ + +## Features +paris + + - _Dynamic query string creation_ + - _Length auto control_ + - _Fully customizable_ (aspiring) + +## Installation +### Installing +#### pip + pip install django-cool-pagination +#### setup.py + git clone https://github.com/joe513/django-cool-pagination.git + cd django-cool-pagination + python setup.py install +### Setting up +#### Add to `INSTALLED_APPS` + INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'django_cool_paginator' +#### Make sure `request` is in `context_processors` + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + +## Using + +### View +#### FBV (Function based view) + + def listing(request): + contact_list = Contacts.objects.all() + paginator = Paginator(contact_list, 25) + + page = request.GET.get('page') + page_obj = paginator.get_page(page) + return render(request, 'list.html', {'page_obj': page_obj}) + +#### CBV (Class based view) + + class Listing(ListView): + model = Item + paginate_by = 5 + +### Template + {% load cool_paginate %} + + {% for contact in page_obj %} + ... + {% endfor %} + + {% cool_paginate page_obj=ENTER HERE YOUR PAGE OBJECT! %} + +> **Note:** +You don't have to specify `page` if its name is `page_obj` as default. + +## Customization +You can customize it so that it works as you want. Customize it by defining settings either in setting.py or +inside of `{% cool_paginate %} ` + +#### setting.py + +`COOL_PAGINATOR_NEXT_NAME` - Name for "next" button in pagination bar.
+`COOL_PAGINATOR_PREVIOUS_NAME` - Name for "previous" button in pagination bar
+`COOL_PAGINATOR_SIZE` - Size of pagination bar (choose: "LARGE" or "SMALL")
+`COOL_PAGINATOR_ELASTIC` - What page width is elastic mode enabled from? + +#### {% cool_paginate page_obj next_name previous_name size elastic %} +`page_obj` - Type here your page object.
+`next_name` - Name for "next" button in pagination bar.
+`previous_name` - Name for "previous" button in pagination bar
+`size` - Size of pagination bar (choose: "LARGE" or "SMALL")
+`elastic` - What page width is elastic mode enabled from? + +> **Note:** +> `{% cool_paginate %}` has a priority, _django-cool-pagination_ will firstly look at this, after at setting.py + +## License +This project is licensed under the MIT License - see the LICENSE file for details +
+ + +_inspired by [inoks/m3u8](https://github.com/inoks/m3u8)_ + +%package -n python3-django-cool-pagination +Summary: Simple pagination app that saves your time. +Provides: python-django-cool-pagination +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-cool-pagination +# django-cool-pagination + +[![Build Status](https://travis-ci.org/joe513/django-cool-pagination.svg?branch=master)](https://travis-ci.org/joe513/django-cool-pagination) +[![Coverage Status](https://coveralls.io/repos/github/joe513/django-cool-pagination/badge.svg?branch=master)](https://coveralls.io/github/joe513/django-cool-pagination?branch=master) +[![PyPI version](https://badge.fury.io/py/django-cool-pagination.svg)](https://badge.fury.io/py/django-cool-pagination) + +*django-cool-pagination* is simple pagination app that saves your time. + +## WARNING: + **The project is still on development stage, some things may not work properly.** + + + + +## Prerequisites +Currently it supports Bootstrap 4.x only. So that you have to add [Bootstrap4](https://getbootstrap.com/docs/4.1/getting-started/download) to your project.
+ + +## Features +paris + + - _Dynamic query string creation_ + - _Length auto control_ + - _Fully customizable_ (aspiring) + +## Installation +### Installing +#### pip + pip install django-cool-pagination +#### setup.py + git clone https://github.com/joe513/django-cool-pagination.git + cd django-cool-pagination + python setup.py install +### Setting up +#### Add to `INSTALLED_APPS` + INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'django_cool_paginator' +#### Make sure `request` is in `context_processors` + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + +## Using + +### View +#### FBV (Function based view) + + def listing(request): + contact_list = Contacts.objects.all() + paginator = Paginator(contact_list, 25) + + page = request.GET.get('page') + page_obj = paginator.get_page(page) + return render(request, 'list.html', {'page_obj': page_obj}) + +#### CBV (Class based view) + + class Listing(ListView): + model = Item + paginate_by = 5 + +### Template + {% load cool_paginate %} + + {% for contact in page_obj %} + ... + {% endfor %} + + {% cool_paginate page_obj=ENTER HERE YOUR PAGE OBJECT! %} + +> **Note:** +You don't have to specify `page` if its name is `page_obj` as default. + +## Customization +You can customize it so that it works as you want. Customize it by defining settings either in setting.py or +inside of `{% cool_paginate %} ` + +#### setting.py + +`COOL_PAGINATOR_NEXT_NAME` - Name for "next" button in pagination bar.
+`COOL_PAGINATOR_PREVIOUS_NAME` - Name for "previous" button in pagination bar
+`COOL_PAGINATOR_SIZE` - Size of pagination bar (choose: "LARGE" or "SMALL")
+`COOL_PAGINATOR_ELASTIC` - What page width is elastic mode enabled from? + +#### {% cool_paginate page_obj next_name previous_name size elastic %} +`page_obj` - Type here your page object.
+`next_name` - Name for "next" button in pagination bar.
+`previous_name` - Name for "previous" button in pagination bar
+`size` - Size of pagination bar (choose: "LARGE" or "SMALL")
+`elastic` - What page width is elastic mode enabled from? + +> **Note:** +> `{% cool_paginate %}` has a priority, _django-cool-pagination_ will firstly look at this, after at setting.py + +## License +This project is licensed under the MIT License - see the LICENSE file for details +
+ + +_inspired by [inoks/m3u8](https://github.com/inoks/m3u8)_ + +%package help +Summary: Development documents and examples for django-cool-pagination +Provides: python3-django-cool-pagination-doc +%description help +# django-cool-pagination + +[![Build Status](https://travis-ci.org/joe513/django-cool-pagination.svg?branch=master)](https://travis-ci.org/joe513/django-cool-pagination) +[![Coverage Status](https://coveralls.io/repos/github/joe513/django-cool-pagination/badge.svg?branch=master)](https://coveralls.io/github/joe513/django-cool-pagination?branch=master) +[![PyPI version](https://badge.fury.io/py/django-cool-pagination.svg)](https://badge.fury.io/py/django-cool-pagination) + +*django-cool-pagination* is simple pagination app that saves your time. + +## WARNING: + **The project is still on development stage, some things may not work properly.** + + + + +## Prerequisites +Currently it supports Bootstrap 4.x only. So that you have to add [Bootstrap4](https://getbootstrap.com/docs/4.1/getting-started/download) to your project.
+ + +## Features +paris + + - _Dynamic query string creation_ + - _Length auto control_ + - _Fully customizable_ (aspiring) + +## Installation +### Installing +#### pip + pip install django-cool-pagination +#### setup.py + git clone https://github.com/joe513/django-cool-pagination.git + cd django-cool-pagination + python setup.py install +### Setting up +#### Add to `INSTALLED_APPS` + INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'django_cool_paginator' +#### Make sure `request` is in `context_processors` + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + +## Using + +### View +#### FBV (Function based view) + + def listing(request): + contact_list = Contacts.objects.all() + paginator = Paginator(contact_list, 25) + + page = request.GET.get('page') + page_obj = paginator.get_page(page) + return render(request, 'list.html', {'page_obj': page_obj}) + +#### CBV (Class based view) + + class Listing(ListView): + model = Item + paginate_by = 5 + +### Template + {% load cool_paginate %} + + {% for contact in page_obj %} + ... + {% endfor %} + + {% cool_paginate page_obj=ENTER HERE YOUR PAGE OBJECT! %} + +> **Note:** +You don't have to specify `page` if its name is `page_obj` as default. + +## Customization +You can customize it so that it works as you want. Customize it by defining settings either in setting.py or +inside of `{% cool_paginate %} ` + +#### setting.py + +`COOL_PAGINATOR_NEXT_NAME` - Name for "next" button in pagination bar.
+`COOL_PAGINATOR_PREVIOUS_NAME` - Name for "previous" button in pagination bar
+`COOL_PAGINATOR_SIZE` - Size of pagination bar (choose: "LARGE" or "SMALL")
+`COOL_PAGINATOR_ELASTIC` - What page width is elastic mode enabled from? + +#### {% cool_paginate page_obj next_name previous_name size elastic %} +`page_obj` - Type here your page object.
+`next_name` - Name for "next" button in pagination bar.
+`previous_name` - Name for "previous" button in pagination bar
+`size` - Size of pagination bar (choose: "LARGE" or "SMALL")
+`elastic` - What page width is elastic mode enabled from? + +> **Note:** +> `{% cool_paginate %}` has a priority, _django-cool-pagination_ will firstly look at this, after at setting.py + +## License +This project is licensed under the MIT License - see the LICENSE file for details +
+ + +_inspired by [inoks/m3u8](https://github.com/inoks/m3u8)_ + +%prep +%autosetup -n django-cool-pagination-0.3.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-cool-pagination -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot - 0.3.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..a70998a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +2d8edd001a6abe1a5008f6689fb04d12 django-cool-pagination-0.3.0.tar.gz -- cgit v1.2.3