diff --git a/bookwyrm/migrations/0151_user_show_guided_tour.py b/bookwyrm/migrations/0151_user_show_guided_tour.py index c5b50b185..ac30f0f90 100644 --- a/bookwyrm/migrations/0151_user_show_guided_tour.py +++ b/bookwyrm/migrations/0151_user_show_guided_tour.py @@ -7,13 +7,13 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('bookwyrm', '0150_readthrough_stopped_date'), + ("bookwyrm", "0150_readthrough_stopped_date"), ] operations = [ migrations.AddField( - model_name='user', - name='show_guided_tour', + model_name="user", + name="show_guided_tour", field=bookwyrm.models.fields.BooleanField(default=True), ), ] diff --git a/bookwyrm/static/js/guided_tour.js b/bookwyrm/static/js/guided_tour.js index 138b518ac..b948e1dab 100644 --- a/bookwyrm/static/js/guided_tour.js +++ b/bookwyrm/static/js/guided_tour.js @@ -4,7 +4,9 @@ * @return {undefined} */ + /* eslint-disable no-unused-vars */ function disableGuidedTour(csrf_token) { + 'use strict' fetch("/guided-tour/False", { headers: { "X-CSRFToken": csrf_token, diff --git a/bookwyrm/views/__init__.py b/bookwyrm/views/__init__.py index bc2d748df..25d662868 100644 --- a/bookwyrm/views/__init__.py +++ b/bookwyrm/views/__init__.py @@ -127,7 +127,14 @@ from .setup import InstanceConfig, CreateAdmin from .status import CreateStatus, EditStatus, DeleteStatus, update_progress from .status import edit_readthrough from .updates import get_notification_count, get_unread_status_string -from .user import User, Followers, Following, hide_suggestions, user_redirect, toggle_guided_tour +from .user import ( + User, + Followers, + Following, + hide_suggestions, + user_redirect, + toggle_guided_tour, +) from .wellknown import * from .annual_summary import ( AnnualSummary, diff --git a/bookwyrm/views/user.py b/bookwyrm/views/user.py index 124a2e96c..1ee93347b 100644 --- a/bookwyrm/views/user.py +++ b/bookwyrm/views/user.py @@ -166,6 +166,7 @@ def user_redirect(request, username): """redirect to a user's feed""" return redirect("user-feed", username=username) + @login_required def toggle_guided_tour(request, tour): """most people don't want a tour every time they load a page"""