mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-24 09:00:33 +00:00
Removed unused views code
This commit is contained in:
parent
c3092c4979
commit
58d617e438
2 changed files with 2 additions and 8 deletions
|
@ -44,7 +44,6 @@ urlpatterns = [
|
|||
re_path(r'^invite/(?P<code>[A-Za-z0-9]+)/?$', views.invite_page),
|
||||
|
||||
path('', views.home),
|
||||
re_path(r'^(?P<tab>home|local|federated)/?$', views.home_tab),
|
||||
re_path(r'^notifications/?', views.notifications_page),
|
||||
re_path(r'import/?$', views.import_page),
|
||||
re_path(r'import_status/(\d+)/?$', views.import_status),
|
||||
|
|
|
@ -43,13 +43,8 @@ def not_found_page(request, _):
|
|||
|
||||
@login_required
|
||||
def home(request):
|
||||
''' this is the same as the feed on the home tab '''
|
||||
return home_tab(request, 'home')
|
||||
|
||||
|
||||
@login_required
|
||||
def home_tab(request, tab):
|
||||
''' user's homepage with activity feed '''
|
||||
# TODO: why on earth would this be where the pagination is set
|
||||
page_size = 15
|
||||
try:
|
||||
page = int(request.GET.get('page', 1))
|
||||
|
@ -85,7 +80,7 @@ def home_tab(request, tab):
|
|||
if len(suggested_books) >= count:
|
||||
break
|
||||
|
||||
activities = get_activity_feed(request.user, tab)
|
||||
activities = get_activity_feed(request.user, 'home')
|
||||
|
||||
activity_count = activities.count()
|
||||
activities = activities[(page - 1) * page_size:page * page_size]
|
||||
|
|
Loading…
Reference in a new issue