commit
d033848d3f
58 changed files with 85 additions and 85 deletions
|
@ -76,7 +76,7 @@ class Dashboard(View):
|
|||
|
||||
|
||||
def get_charts_and_stats(request):
|
||||
"""Defines the dashbaord charts"""
|
||||
"""Defines the dashboard charts"""
|
||||
interval = int(request.GET.get("days", 1))
|
||||
now = timezone.now()
|
||||
start = request.GET.get("start")
|
||||
|
|
|
@ -154,7 +154,7 @@ def add_authors(request, data):
|
|||
data["author_matches"] = []
|
||||
data["isni_matches"] = []
|
||||
|
||||
# creting a book or adding an author to a book needs another step
|
||||
# creating a book or adding an author to a book needs another step
|
||||
data["confirm_mode"] = True
|
||||
# this isn't preserved because it isn't part of the form obj
|
||||
data["remove_authors"] = request.POST.getlist("remove_authors")
|
||||
|
|
|
@ -104,7 +104,7 @@ def raise_is_blocked_activity(activity_json):
|
|||
|
||||
def sometimes_async_activity_task(activity_json, queue=MEDIUM):
|
||||
"""Sometimes we can effectively respond to a request without queuing a new task,
|
||||
and whever that is possible, we should do it."""
|
||||
and whenever that is possible, we should do it."""
|
||||
activity = activitypub.parse(activity_json)
|
||||
|
||||
# try resolving this activity without making any http requests
|
||||
|
|
|
@ -14,7 +14,7 @@ from bookwyrm.views.list.list import normalize_book_list_ordering
|
|||
# pylint: disable=no-self-use
|
||||
@method_decorator(login_required, name="dispatch")
|
||||
class Curate(View):
|
||||
"""approve or discard list suggestsions"""
|
||||
"""approve or discard list suggestions"""
|
||||
|
||||
def get(self, request, list_id):
|
||||
"""display a pending list"""
|
||||
|
|
|
@ -14,7 +14,7 @@ from bookwyrm.settings import PAGE_LENGTH
|
|||
|
||||
# pylint: disable=no-self-use
|
||||
class EmbedList(View):
|
||||
"""embeded book list page"""
|
||||
"""embedded book list page"""
|
||||
|
||||
def get(self, request, list_id, list_key):
|
||||
"""display a book list"""
|
||||
|
|
|
@ -186,7 +186,7 @@ def update_readthrough_on_shelve(
|
|||
active_readthrough = models.ReadThrough.objects.create(
|
||||
user=user, book=annotated_book
|
||||
)
|
||||
# santiize and set dates
|
||||
# sanitize and set dates
|
||||
active_readthrough.start_date = load_date_in_user_tz_as_utc(start_date, user)
|
||||
# if the stop or finish date is set, the readthrough will be set as inactive
|
||||
active_readthrough.finish_date = load_date_in_user_tz_as_utc(finish_date, user)
|
||||
|
|
|
@ -232,7 +232,7 @@ def find_mentions(user, content):
|
|||
if not content:
|
||||
return {}
|
||||
# The regex has nested match groups, so the 0th entry has the full (outer) match
|
||||
# And beacuse the strict username starts with @, the username is 1st char onward
|
||||
# And because the strict username starts with @, the username is 1st char onward
|
||||
usernames = [m[0][1:] for m in re.findall(regex.STRICT_USERNAME, content)]
|
||||
|
||||
known_users = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue