This commit is contained in:
Xavier Fiechter 2024-06-06 16:48:32 +02:00
parent 6c69260b89
commit 5999f48a58
5 changed files with 6 additions and 19 deletions

View file

@ -21,7 +21,6 @@ def attachment_upload(instance, filename):
class AttachmentManager(models.Manager):
def attachments_for_object(self, obj):
object_type = ContentType.objects.get_for_model(obj)
print ("x attachments_for_object id {} , {} {}".format( obj.pk, object_type, object_type.id ))
return self.filter(content_type__pk=object_type.id, object_id=obj.pk)

View file

@ -36,7 +36,7 @@ class LabelForm(forms.ModelForm):
for field_name in self.fields:
self.fields[field_name].label = mark_safe(
f'<label class="bip329-attr">{self.fields[field_name].label}</label>')
class ExportLabelsForm(forms.Form):
""" """

View file

@ -13,16 +13,13 @@ def read_file_content(file_path):
def generate_random_string(length):
# Exclude curly braces '{}' from the pool of characters
characters = string.ascii_letters + string.digits
return ''.join(secrets.choice(characters) for _ in range(length))
def generate_config_file(config_file_path="config.ini"):
config = configparser.ConfigParser()
# Generate random values where needed
dj_secret_key = generate_random_string(50)
#database_password = read_file_content("/run/secrets/mysql_password")
database_password = os.getenv("MYSQL_PASSWORD")
crypto_salt = 'labelbase_{}_'.format(generate_random_string(32))
@ -32,7 +29,7 @@ def generate_config_file(config_file_path="config.ini"):
'proj_name': 'labelbase',
'crypto_salt': crypto_salt,
'allowed_host': '*',
'debug': True,
'debug': False,
'current_timestamp_seconds': int(time.time()),
'sentry_dsn': 'https://3b833ae08ccc4ff68793e961fff4921c@o4504646963232768.ingest.sentry.io/4504646967361536',
}

View file

@ -38,13 +38,7 @@
Update spent Outputs
</a>
</li>
<li>
<a class="dropdown-item" href="{#% url "labelbase_actions" labelbase_id=labelbase.id action="update-spent-outputs" %#}">
Derived addresses from xpub <!-- only enable if there's an xpub in out labelbase -->
</a>
</li>
</ul>
</ul>
</div>
<div class="btn-group" role="group">

View file

@ -5,7 +5,7 @@
{% block nav_home %}active{% endblock %}
{% block content %}
<div class="p-3 pb-md-4 mx-auto text-center">
<h1 style="padding-top: 1.6em; padding-bottom: 0.9em; text-transform: uppercase;font-weight:800;">L<span style="height:1.1em; width:1em" data-feather="tag" class="align-text-bottom"></span>belbase</h1>
<h2 class="display-6 fw-normal" style="padding-bottom: 0.9em;">All your labels in one place.</h2>
@ -18,11 +18,8 @@
<!-- Centered "Getting Started" CTA Block -->
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="card mb-4 rounded-3 shadow-sm">
<img src="/static/Encryption.png"
class="card-img-top"
alt="..."
style="padding: 0.25em;">
<div class="mb-4 rounded-3">
<img src="/static/Encryption.png" class="card-img-top" style="padding: 0.25em;">
<div class="card-body">
<p style="font-weight: 700;">Your labels are encrypted.<br>&nbsp;</p>