mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-18 13:09:04 +02:00
.
This commit is contained in:
parent
6d7dbfc7d0
commit
849133894d
3 changed files with 8 additions and 20 deletions
|
|
@ -2,6 +2,7 @@ from django.db import models
|
|||
from django.contrib.auth.models import User
|
||||
from django.urls import reverse
|
||||
import jsonfield
|
||||
from django_cryptography.fields import encrypt
|
||||
|
||||
class Labelbase(models.Model):
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
|
|
@ -44,15 +45,15 @@ class Label(models.Model):
|
|||
choices=TYPE_CHOICES,
|
||||
default=TYPE_ADDR,
|
||||
)
|
||||
ref = models.CharField(
|
||||
ref = encrypt(models.CharField(
|
||||
max_length=160,
|
||||
default="",
|
||||
blank=True,
|
||||
)
|
||||
label = models.CharField(
|
||||
))
|
||||
label = encrypt(models.CharField(
|
||||
max_length=160,
|
||||
default="",
|
||||
blank=True,
|
||||
)
|
||||
data = jsonfield.JSONField()
|
||||
))
|
||||
data = encrypt(jsonfield.JSONField())
|
||||
labelbase = models.ForeignKey(Labelbase, on_delete=models.CASCADE)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ TEMPLATES = [
|
|||
WSGI_APPLICATION = 'labellabor.wsgi.application'
|
||||
|
||||
TWO_FACTOR_REMEMBER_COOKIE_AGE = 60*60*24*14
|
||||
|
||||
CRYPTOGRAPHY_SALT = "labelbase.cloud"
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||
|
|
|
|||
|
|
@ -1,21 +1,9 @@
|
|||
{% extends "_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="padding-top: 1em;">
|
||||
{% if labelbase %}
|
||||
{#% if unpaide %#}
|
||||
|
||||
Cost: 10,000 sats
|
||||
|
||||
Unlock Now
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col float-start">
|
||||
<h2>{% block title %}{{ labelbase.name }} {% endblock %}</h2>
|
||||
|
|
@ -24,9 +12,8 @@ Unlock Now
|
|||
<p>{{ about.about}} </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col float-end" >
|
||||
|
||||
<div class="btn-group float-end" role="group" aria-label="Button group with nested dropdown">
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addLabelModal">Add Label</button>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue