mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
Unisexe clothing cut
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
|
||||
# Copyright (C) 2018-2023 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django import forms
|
||||
@ -38,7 +38,7 @@ class WEIRegistrationForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = WEIRegistration
|
||||
exclude = ('wei', )
|
||||
exclude = ('wei', 'clothing_cut')
|
||||
widgets = {
|
||||
"user": Autocomplete(
|
||||
User,
|
||||
|
18
apps/wei/migrations/0006_unisex_clothing_cut.py
Normal file
18
apps/wei/migrations/0006_unisex_clothing_cut.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.28 on 2023-07-09 09:51
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wei', '0005_auto_20230128_1850'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='weiregistration',
|
||||
name='clothing_cut',
|
||||
field=models.CharField(choices=[('male', 'Male'), ('female', 'Female'), ('unisex', 'Unisex')], default='unisex', max_length=16, verbose_name='clothing cut'),
|
||||
),
|
||||
]
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
|
||||
# Copyright (C) 2018-2023 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import json
|
||||
@ -209,7 +209,9 @@ class WEIRegistration(models.Model):
|
||||
choices=(
|
||||
('male', _("Male")),
|
||||
('female', _("Female")),
|
||||
('unisex', _("Unisex")),
|
||||
),
|
||||
default='unisex',
|
||||
verbose_name=_("clothing cut"),
|
||||
)
|
||||
|
||||
|
@ -56,7 +56,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<dd class="col-xl-6">{{ registration.get_gender_display }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'clothing cut'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.clothing_cut }}</dd>
|
||||
<dd class="col-xl-6">{{ registration.get_clothing_cut_display }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'clothing size'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.clothing_size }}</dd>
|
||||
|
Reference in New Issue
Block a user