add starting_number

This commit is contained in:
Martin Quarda 2024-05-06 11:09:37 +02:00
parent 44c14d13d1
commit e1a6fabbf6
3 changed files with 38 additions and 3 deletions

View File

@ -0,0 +1,28 @@
# Generated by Django 4.2.11 on 2024-05-06 09:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('alkatorapi', '0004_user_address'),
]
operations = [
migrations.AddField(
model_name='user',
name='starting_number',
field=models.IntegerField(blank=True, null=True),
),
migrations.AlterField(
model_name='user',
name='date_of_birth',
field=models.DateField(blank=True, null=True),
),
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(blank=True, max_length=120, null=True),
),
]

View File

@ -5,11 +5,12 @@ class User(models.Model):
first_name = models.CharField(max_length=120) first_name = models.CharField(max_length=120)
last_name = models.CharField(max_length=120) last_name = models.CharField(max_length=120)
address = models.CharField(max_length=255) address = models.CharField(max_length=255)
email = models.EmailField(max_length=120) email = models.EmailField(max_length=120, null=True, blank=True)
date_of_birth = models.DateField() date_of_birth = models.DateField(null=True, blank=True)
register_date = models.DateTimeField(auto_now=True) register_date = models.DateTimeField(auto_now=True)
paid = models.BooleanField(default=False) paid = models.BooleanField(default=False)
duration = models.DurationField(null=True, blank=True) duration = models.DurationField(null=True, blank=True)
starting_number = models.IntegerField(null=True, blank=True)
def __str__(self): def __str__(self):
return f"<User {self.first_name} {self.last_name} {self.email} {self.paid}>" return f"<User {self.first_name} {self.last_name} {self.email} {self.paid}>"

View File

@ -106,6 +106,7 @@ class Main extends Component {
<div class="container"> <div class="container">
<img class="logo" src="/public/logo.svg"></img> <img class="logo" src="/public/logo.svg"></img>
</div> </div>
{/*
<div class="container info text-center"> <div class="container info text-center">
<div class="row"> <div class="row">
<h1 class="col val"> <h1 class="col val">
@ -130,9 +131,10 @@ class Main extends Component {
</h1> </h1>
</div> </div>
</div> </div>
*/}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="text col-xl-6"> <div class="text">
<p>Vítej člověče! Momentálně se nacházíš na oficiální stránce závodu ALKÁTOR RACE.</p> <p>Vítej člověče! Momentálně se nacházíš na oficiální stránce závodu ALKÁTOR RACE.</p>
<p>A co že jsme si to zase vymysleli!? </p> <p>A co že jsme si to zase vymysleli!? </p>
@ -152,15 +154,18 @@ class Main extends Component {
<p>Rozhodně se podívej na FAQ sekci, zde na stránce, kde najdeš důležité informace týkající se závodu ALKÁTOR RACE.</p> <p>Rozhodně se podívej na FAQ sekci, zde na stránce, kde najdeš důležité informace týkající se závodu ALKÁTOR RACE.</p>
<p>Sportem ku chlastu!</p> <p>Sportem ku chlastu!</p>
</div> </div>
{/*
<div class="col-xl-6"> <div class="col-xl-6">
<img src="/public/trasa.png" style={{'width': '100%', 'height': 'auto'}}/> <img src="/public/trasa.png" style={{'width': '100%', 'height': 'auto'}}/>
<iframe width="100%" height="500px" src="https://www.youtube.com/embed/H1UeXTBpsXw?si=kkh2_BBJXw56gVaP" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="true" /> <iframe width="100%" height="500px" src="https://www.youtube.com/embed/H1UeXTBpsXw?si=kkh2_BBJXw56gVaP" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="true" />
</div> </div>
*/}
</div> </div>
</div> </div>
<div class="container text text-center"> <div class="container text text-center">
<h2>Stále nevíš, jestli se zúčastníš? Přečti si náš <button type="button" class="btn btn-warning" onClick={(e) => this.togglefaq()}>FAQ</button></h2> <h2>Stále nevíš, jestli se zúčastníš? Přečti si náš <button type="button" class="btn btn-warning" onClick={(e) => this.togglefaq()}>FAQ</button></h2>
</div> </div>
{/*
<form id="form" class="container" onSubmit={(e) => this.onSubmit(e)}> <form id="form" class="container" onSubmit={(e) => this.onSubmit(e)}>
<h1>Registrace</h1> <h1>Registrace</h1>
<div class="mb-3"> <div class="mb-3">
@ -189,6 +194,7 @@ class Main extends Component {
</div> </div>
<button type="submit" class="btn btn-primary">Odeslat</button> <button type="submit" class="btn btn-primary">Odeslat</button>
</form> </form>
*/}
<div class="container text-center social"> <div class="container text-center social">
<div class="row"> <div class="row">
<a class="col-lg-3" style={{"color": "black"}} href="mailto:info@alkator.cz"><b>info@alkator.cz</b></a> <a class="col-lg-3" style={{"color": "black"}} href="mailto:info@alkator.cz"><b>info@alkator.cz</b></a>