From 26b6fab13fb1f442db9af4d8c380484ba0dac84c Mon Sep 17 00:00:00 2001 From: Paolo D'Amico Date: Wed, 31 Mar 2021 13:36:14 -0700 Subject: [PATCH] fix typos --- posthog/api/authentication.py | 2 +- posthog/settings.py | 2 +- posthog/urls.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/posthog/api/authentication.py b/posthog/api/authentication.py index 4630473e1b5..a32f414a4d8 100644 --- a/posthog/api/authentication.py +++ b/posthog/api/authentication.py @@ -11,7 +11,7 @@ from posthog.event_usage import report_user_logged_in from posthog.models import User -def axess_logout(*args, **kwargs): +def axess_lockout(*args, **kwargs): return JsonResponse( { "type": "authentication_error", diff --git a/posthog/settings.py b/posthog/settings.py index 3dffbf863c2..4f3c86433ac 100644 --- a/posthog/settings.py +++ b/posthog/settings.py @@ -203,7 +203,7 @@ STATSD_PREFIX = os.getenv("STATSD_PREFIX", "") AXES_ENABLED = get_from_env("AXES_ENABLED", True, type_cast=strtobool) AXES_FAILURE_LIMIT = int(os.getenv("AXES_FAILURE_LIMIT", 5)) AXES_COOLOFF_TIME = timedelta(minutes=15) -AXES_LOCKOUT_CALLABLE = "posthog.api.authentication.axess_logout" +AXES_LOCKOUT_CALLABLE = "posthog.api.authentication.axess_lockout" AXES_META_PRECEDENCE_ORDER = [ "HTTP_X_FORWARDED_FOR", "REMOTE_ADDR", diff --git a/posthog/urls.py b/posthog/urls.py index 59326bafccc..f929a2083fa 100644 --- a/posthog/urls.py +++ b/posthog/urls.py @@ -22,17 +22,16 @@ from posthog.api import ( capture, dashboard, decide, - organization, projects_router, router, signup, user, ) +from posthog.api.signup import SignupSerializer from posthog.demo import demo from posthog.email import is_email_available from posthog.event_usage import report_user_signed_up -from .api.organization import OrganizationSignupSerializer from .models import OrganizationInvite, Team, User from .utils import render_template from .views import health, login_required, preflight_check, stats, system_status @@ -92,7 +91,7 @@ def social_create_user(strategy: DjangoStrategy, details, backend, request, user if not organization_name or email_opt_in is None: return redirect(finish_social_signup) - serializer = OrganizationSignupSerializer( + serializer = SignupSerializer( data={ "organization_name": organization_name, "email_opt_in": email_opt_in,