From 5999f48a58c7caf5b08b89acb57446f88a9364ab Mon Sep 17 00:00:00 2001 From: Xavier Fiechter Date: Thu, 6 Jun 2024 16:48:32 +0200 Subject: [PATCH] . --- django/attachments/models.py | 1 - django/labelbase/forms.py | 2 +- django/labellabor/make_config.py | 5 +---- django/templates/_labelbase_header_info_menu.html | 8 +------- django/templates/encryption.html | 9 +++------ 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/django/attachments/models.py b/django/attachments/models.py index 01da2d4..2f107cf 100644 --- a/django/attachments/models.py +++ b/django/attachments/models.py @@ -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) diff --git a/django/labelbase/forms.py b/django/labelbase/forms.py index c7cf230..d2fcec6 100644 --- a/django/labelbase/forms.py +++ b/django/labelbase/forms.py @@ -36,7 +36,7 @@ class LabelForm(forms.ModelForm): for field_name in self.fields: self.fields[field_name].label = mark_safe( f'') - + class ExportLabelsForm(forms.Form): """ """ diff --git a/django/labellabor/make_config.py b/django/labellabor/make_config.py index a73643e..db2a7c0 100644 --- a/django/labellabor/make_config.py +++ b/django/labellabor/make_config.py @@ -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', } diff --git a/django/templates/_labelbase_header_info_menu.html b/django/templates/_labelbase_header_info_menu.html index cb66fc5..f16d081 100644 --- a/django/templates/_labelbase_header_info_menu.html +++ b/django/templates/_labelbase_header_info_menu.html @@ -38,13 +38,7 @@ Update spent Outputs - -
  • - - Derived addresses from xpub - -
  • - +
    diff --git a/django/templates/encryption.html b/django/templates/encryption.html index be512f6..c925c51 100644 --- a/django/templates/encryption.html +++ b/django/templates/encryption.html @@ -5,7 +5,7 @@ {% block nav_home %}active{% endblock %} {% block content %} - +

    Lbelbase

    All your labels in one place.

    @@ -18,11 +18,8 @@
    -
    - ... +
    +

    Your labels are encrypted.