mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
fix COMMIT_HASH missing error
This commit is contained in:
parent
17b35496cc
commit
e20eb52f15
2 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,7 @@ from django.conf import settings
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
|
from django_stubs_ext.db.models import TypedModelMeta
|
||||||
|
|
||||||
|
|
||||||
def generate_secret_token() -> str:
|
def generate_secret_token() -> str:
|
||||||
|
@ -24,7 +25,7 @@ class APIToken(models.Model):
|
||||||
created = models.DateTimeField(auto_now_add=True)
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
expires = models.DateTimeField(null=True, blank=True)
|
expires = models.DateTimeField(null=True, blank=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta(TypedModelMeta):
|
||||||
verbose_name = "API Key"
|
verbose_name = "API Key"
|
||||||
verbose_name_plural = "API Keys"
|
verbose_name_plural = "API Keys"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ from api.auth import API_AUTH_METHODS
|
||||||
from ..config import VERSION, COMMIT_HASH
|
from ..config import VERSION, COMMIT_HASH
|
||||||
|
|
||||||
|
|
||||||
|
COMMIT_HASH = COMMIT_HASH or 'unknown'
|
||||||
|
|
||||||
html_description=f'''
|
html_description=f'''
|
||||||
<h3>Welcome to your ArchiveBox server's REST API <code>[v1 ALPHA]</code> homepage!</h3>
|
<h3>Welcome to your ArchiveBox server's REST API <code>[v1 ALPHA]</code> homepage!</h3>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue