Last posts didn't show last 5 posts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Widelands Website |
Fix Released
|
Low
|
Unassigned |
Bug Description
Under sum circumstances the Last Posts box does not show the last 5 posts.
The for-loop in pybb/templateta
The for-loop gathers only the last post in each topic. This result in less shown 'Last Posts': Extreme example: If the 25 'last_posts' are made in one topic, the 'Last Post' box shows only one entry (the last post in this topic).
I have increased the limit for last_posts to 45 now.
Another solution would be to show all last posts, independent of the topic. We may need additional UI elements then, like shown here https:/
Suggestions?
Related branches
- GunChleoc: Approve
- kaputtnik (community): Needs Resubmitting
-
Diff: 337 lines (+221/-10)9 files modifiedmainpage/templates/mainpage/header.html (+1/-1)
pybb/forms.py (+12/-0)
pybb/settings.py (+1/-0)
pybb/templates/pybb/all_last_posts.html (+73/-0)
pybb/templates/pybb/inlines/latest_posts_table.html (+21/-0)
pybb/templates/pybb/last_posts.html (+3/-0)
pybb/templatetags/pybb_extras.py (+11/-8)
pybb/urls.py (+1/-0)
pybb/views.py (+98/-1)
Changed in widelands-website: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in widelands-website: | |
status: | In Progress → Fix Released |
assignee: | kaputtnik (franku) → nobody |
I don't know how the filtering in Django works, but normally I would ask the database to select the last 5 posts that meet the filter condition. SQL looks something like
Select <fields> from table where (<condition>) limit 5
Can we coax Django into doing something like that?