*: make generic template's base parameterised

This commit is contained in:
Jens Langhammer 2020-10-18 15:19:01 +02:00
parent 152b2d863d
commit 6a53069653
6 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ class TestProviderProxy(SeleniumTestCase):
auto_remove=True,
environment={
"PASSBOOK_HOST": self.live_server_url,
"PASSBOOK_TOKEN": outpost.token.token_uuid.hex,
"PASSBOOK_TOKEN": outpost.token.key,
},
)
return container

View File

@ -1,4 +1,4 @@
{% extends "administration/base.html" %}
{% extends container_template|default:"administration/base.html" %}
{% load i18n %}
{% load passbook_utils %}

View File

@ -28,7 +28,7 @@ def token_from_header(raw_header: bytes) -> Optional[Token]:
# TODO: Remove this workaround
# temporary fallback for 0.11 to 0.12 upgrade
# 0.11 and below proxy sends authorization header not base64 encoded
auth_credentials = auth_credentials
pass
# Accept credentials with username and without
if ":" in auth_credentials:
_, password = auth_credentials.split(":")

View File

@ -34,7 +34,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="token",
name="identifier",
field=models.CharField(max_length=255),
field=models.SlugField(max_length=255),
),
migrations.AddIndex(
model_name="token",

View File

@ -309,7 +309,7 @@ class Token(ExpiringModel):
"""Token used to authenticate the User for API Access or confirm another Stage like Email."""
token_uuid = models.UUIDField(primary_key=True, editable=False, default=uuid4)
identifier = models.CharField(max_length=255)
identifier = models.SlugField(max_length=255)
key = models.TextField(default=default_token_key)
intent = models.TextField(
choices=TokenIntents.choices, default=TokenIntents.INTENT_VERIFICATION

View File

@ -1,4 +1,4 @@
{% extends "administration/base.html" %}
{% extends container_template|default:"administration/base.html" %}
{% load i18n %}
{% load passbook_utils %}