linting fixes

This commit is contained in:
Hugh Rundle 2022-07-03 17:14:13 +10:00
parent f8e51b5826
commit b82cf887e2
4 changed files with 14 additions and 4 deletions

View file

@ -7,13 +7,13 @@ from django.db import migrations
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('bookwyrm', '0150_readthrough_stopped_date'), ("bookwyrm", "0150_readthrough_stopped_date"),
] ]
operations = [ operations = [
migrations.AddField( migrations.AddField(
model_name='user', model_name="user",
name='show_guided_tour', name="show_guided_tour",
field=bookwyrm.models.fields.BooleanField(default=True), field=bookwyrm.models.fields.BooleanField(default=True),
), ),
] ]

View file

@ -4,7 +4,9 @@
* @return {undefined} * @return {undefined}
*/ */
/* eslint-disable no-unused-vars */
function disableGuidedTour(csrf_token) { function disableGuidedTour(csrf_token) {
'use strict'
fetch("/guided-tour/False", { fetch("/guided-tour/False", {
headers: { headers: {
"X-CSRFToken": csrf_token, "X-CSRFToken": csrf_token,

View file

@ -127,7 +127,14 @@ from .setup import InstanceConfig, CreateAdmin
from .status import CreateStatus, EditStatus, DeleteStatus, update_progress from .status import CreateStatus, EditStatus, DeleteStatus, update_progress
from .status import edit_readthrough from .status import edit_readthrough
from .updates import get_notification_count, get_unread_status_string 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 .wellknown import *
from .annual_summary import ( from .annual_summary import (
AnnualSummary, AnnualSummary,

View file

@ -166,6 +166,7 @@ def user_redirect(request, username):
"""redirect to a user's feed""" """redirect to a user's feed"""
return redirect("user-feed", username=username) return redirect("user-feed", username=username)
@login_required @login_required
def toggle_guided_tour(request, tour): def toggle_guided_tour(request, tour):
"""most people don't want a tour every time they load a page""" """most people don't want a tour every time they load a page"""