From c87ff05370be9f9e8828b22c69c19800c8247a60 Mon Sep 17 00:00:00 2001 From: Martin Quarda Date: Thu, 10 Oct 2024 00:50:32 +0200 Subject: [PATCH] =?UTF-8?q?registra=C4=8Dn=C3=AD=20formul=C3=A1=C5=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alkator/settings.py | 4 ++-- alkatorapi/models.py | 7 +++++++ frontend/src/scripts/index.js | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/alkator/settings.py b/alkator/settings.py index 4a022bf..391ba03 100644 --- a/alkator/settings.py +++ b/alkator/settings.py @@ -84,9 +84,9 @@ DATABASES = { } -COMGATE_MERCHANT = 485044 +COMGATE_MERCHANT = 484757 COMGATE_TEST = True -COMGATE_SECRET = '4c36b7faf40575073b26570066ca2a9f' +COMGATE_SECRET = '2c07bfabd1a5e4a312dc49929de60aa2' ADMINS = [('Martin Quarda', 'martin@quarda.cz')] diff --git a/alkatorapi/models.py b/alkatorapi/models.py index 72ca210..3d02c90 100644 --- a/alkatorapi/models.py +++ b/alkatorapi/models.py @@ -51,6 +51,9 @@ class Profile(models.Model): last_name = models.CharField(max_length=120) address = models.CharField(max_length=255, null=True, blank=True) + def __str__(self): + return f"" + class Racer(models.Model): profile = models.ForeignKey(Profile, related_name='racers', on_delete=models.CASCADE) @@ -68,3 +71,7 @@ class Racer(models.Model): price = models.IntegerField(default=690) paid = models.BooleanField(default=False) invoice_id = models.IntegerField(null=True, blank=True, unique=True) + + + def __str__(self): + return f"" diff --git a/frontend/src/scripts/index.js b/frontend/src/scripts/index.js index 2559e57..332281c 100644 --- a/frontend/src/scripts/index.js +++ b/frontend/src/scripts/index.js @@ -167,6 +167,11 @@ class Main extends Component { Přihlašování } + {Object.keys(this.state.login_status).length === 0 && + + } {Object.keys(this.state.login_status).length > 0 &&