mirror of https://github.com/zulip/zulip.git
confirmation/views: Emphasize that only prereg user uses this path.
This commit is contained in:
parent
b3654c7b7e
commit
bffc7f97a5
|
@ -14,6 +14,8 @@ from confirmation.models import Confirmation
|
||||||
from zerver.models import PreregistrationUser
|
from zerver.models import PreregistrationUser
|
||||||
|
|
||||||
|
|
||||||
|
# This is currently only used for confirming PreregistrationUser.
|
||||||
|
# Do not add other confirmation paths here.
|
||||||
def confirm(request, confirmation_key):
|
def confirm(request, confirmation_key):
|
||||||
# type: (HttpRequest, str) -> HttpResponse
|
# type: (HttpRequest, str) -> HttpResponse
|
||||||
confirmation_key = confirmation_key.lower()
|
confirmation_key = confirmation_key.lower()
|
||||||
|
@ -35,7 +37,6 @@ def confirm(request, confirmation_key):
|
||||||
templates = [
|
templates = [
|
||||||
'confirmation/confirm.html',
|
'confirmation/confirm.html',
|
||||||
]
|
]
|
||||||
if obj and isinstance(obj, (PreregistrationUser, Confirmation)):
|
if obj:
|
||||||
# if we have an object, we can use specific template
|
templates = ['confirmation/confirm_preregistrationuser.html']
|
||||||
templates.insert(0, 'confirmation/confirm_%s.html' % (obj._meta.model_name,))
|
|
||||||
return render(request, templates, context=ctx)
|
return render(request, templates, context=ctx)
|
||||||
|
|
Loading…
Reference in New Issue