gbdev / homebrewhub

A digital repository of of homebrews, patches, hackroms for old consoles. Provides community submission, tagging and rating features.
https://hh.gbdev.io
GNU General Public License v3.0
44 stars 9 forks source link

feat: random entry #113

Closed dag7dev closed 1 month ago

dag7dev commented 1 month ago

Description

dag7dev commented 1 month ago

Please also make sure to run pre-commit, as the checks are failing due to some unformatted file

not sure why it hasn't been ran automatically

dag7dev commented 1 month ago

I'm pretty sure about it. When I have some time, I will send a screenshot to clarify this

-------- Messaggio originale -------- 18/05/24 22:22, Antonio Vivace ha scritto:

@avivace commented on this pull request.


In hhub/views.py:

@@ -171,7 +174,7 @@ def search_entries(request):

total number of pages

"page_total": paginator.num_pages,

current request page

  • "page_current": page,
  • "page_current": int(page),

What? That's not true. At this line, page is used to paginate, if it's not a proper integer it would've failed there, so there's no way the code progress with page being a string.

— Reply to this email directly, [view it on GitHub] You are receiving this because you were mentioned.Message ID: @.***>

dag7dev commented 1 month ago

@avivace take a look. This is without the "int" image

Same goes for other nums obviously: image

This is with it and intended: image

avivace commented 1 month ago

Ah alright, I understood what you mean, it's on the way back on the response