New version of black, new whitespace
This commit is contained in:
@ -26,10 +26,10 @@ from . import helpers
|
||||
name="dispatch",
|
||||
)
|
||||
class ManageInvites(View):
|
||||
""" create invites """
|
||||
"""create invites"""
|
||||
|
||||
def get(self, request):
|
||||
""" invite management page """
|
||||
"""invite management page"""
|
||||
paginated = Paginator(
|
||||
models.SiteInvite.objects.filter(user=request.user).order_by(
|
||||
"-created_date"
|
||||
@ -44,7 +44,7 @@ class ManageInvites(View):
|
||||
return TemplateResponse(request, "settings/manage_invites.html", data)
|
||||
|
||||
def post(self, request):
|
||||
""" creates an invite database entry """
|
||||
"""creates an invite database entry"""
|
||||
form = forms.CreateInviteForm(request.POST)
|
||||
if not form.is_valid():
|
||||
return HttpResponseBadRequest("ERRORS : %s" % (form.errors,))
|
||||
@ -64,10 +64,10 @@ class ManageInvites(View):
|
||||
|
||||
|
||||
class Invite(View):
|
||||
""" use an invite to register """
|
||||
"""use an invite to register"""
|
||||
|
||||
def get(self, request, code):
|
||||
""" endpoint for using an invites """
|
||||
"""endpoint for using an invites"""
|
||||
if request.user.is_authenticated:
|
||||
return redirect("/")
|
||||
invite = get_object_or_404(models.SiteInvite, code=code)
|
||||
@ -83,10 +83,10 @@ class Invite(View):
|
||||
|
||||
|
||||
class ManageInviteRequests(View):
|
||||
""" grant invites like the benevolent lord you are """
|
||||
"""grant invites like the benevolent lord you are"""
|
||||
|
||||
def get(self, request):
|
||||
""" view a list of requests """
|
||||
"""view a list of requests"""
|
||||
ignored = request.GET.get("ignored", False)
|
||||
sort = request.GET.get("sort")
|
||||
sort_fields = [
|
||||
@ -132,7 +132,7 @@ class ManageInviteRequests(View):
|
||||
return TemplateResponse(request, "settings/manage_invite_requests.html", data)
|
||||
|
||||
def post(self, request):
|
||||
""" send out an invite """
|
||||
"""send out an invite"""
|
||||
invite_request = get_object_or_404(
|
||||
models.InviteRequest, id=request.POST.get("invite-request")
|
||||
)
|
||||
@ -152,10 +152,10 @@ class ManageInviteRequests(View):
|
||||
|
||||
|
||||
class InviteRequest(View):
|
||||
""" prospective users sign up here """
|
||||
"""prospective users sign up here"""
|
||||
|
||||
def post(self, request):
|
||||
""" create a request """
|
||||
"""create a request"""
|
||||
form = forms.InviteRequestForm(request.POST)
|
||||
received = False
|
||||
if form.is_valid():
|
||||
@ -172,7 +172,7 @@ class InviteRequest(View):
|
||||
|
||||
@require_POST
|
||||
def ignore_invite_request(request):
|
||||
""" hide an invite request """
|
||||
"""hide an invite request"""
|
||||
invite_request = get_object_or_404(
|
||||
models.InviteRequest, id=request.POST.get("invite-request")
|
||||
)
|
||||
|
Reference in New Issue
Block a user