mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-13 12:33:23 +02:00
.
This commit is contained in:
parent
6c69260b89
commit
5999f48a58
5 changed files with 6 additions and 19 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
""" """
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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> </p>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue