Python Flask SQLAlchemy Pagination with Search LIKE, Equals, IN, AND and OR - Datatable

preview_player
Показать описание
Python Flask SQLAlchemy Pagination with Search LIKE, Equals, IN, AND and OR - Datatable

Python Flask SQLAlchemy Pagination with Search LIKE, Equals, IN, AND and OR - Datatable

OR: from sqlalchemy import or_

Рекомендации по теме
Комментарии
Автор

For those who are having problems with pagination (on pages than the first where searched string become None, listing all the data) when creating some kind of search engine using this tutorial. It can be solved by:
Stop the video on 12:02

- Removing "<int:page>" and "defaults={"page": 1}" from routes, keeping only one route with name and methods only.
- Remove as well the parameter "page" from the "def index()".
- Insert right below "def index():", this line: "page = request.args.get('page', 1, type=int)".
- Insert right before "per_page=pages" on line 30 "page=page";
- On Jinja2 template, where there are two occurences of "page=page" insert as well tag=tag.

Now it should work.

abeilcoelho
Автор

The flute is killing me man 😂🤣👍
But nice video 👌

nishantkr
Автор

How do I keep the check selected when I change pages? Every time I change pages, the check unmarks.Thanks

brunohenriquenascimento
Автор

Can you please suggest the pagination issue ?
Do we need to set a session variable or any other way ??

DevOpsDoctor
Автор

HI,
Thanks for this nice example.
I learned from this tutorial and achieved the same application like yours.

I am getting one issue -
Pagination is working fine.
when we search for something it shows the correct number of records and page numbers, but when we click on any page number now that time it shows all data. and "search for" also disappear.
could you check please and guide me on this.

merajitm
Автор

Not working with like function.
I have to type full name for search just case sensitive fixed by this.

memeplay
Автор

hey hey
awesome guide!
but how can I use filter with like with few columns with different datatypes?

МиколаБілецький-ял
Автор

How to make it look for everything in the database?

ux
Автор

Pagination not working In case of multiple pages after search

DevOpsDoctor
Автор

dude you need to change your editor, it's old. Switch to VS code or smth.

remixowlz
Автор

did we go back to the 90s'
dude if you think this video is helpful in any way, then your mistaken.

rmdn
Автор

Hi please I need you to join me on team viewer to solve some error with my flask application

kkfcompilation