Compare commits
No commits in common. "cf544dc59680e64cd68490d4b829ce24ff0fc7f7" and "145806b5ce73a5449a2b7690ceebbfd4571373b0" have entirely different histories.
cf544dc596
...
145806b5ce
|
@ -142,8 +142,8 @@ class BorrowAdmin(VersionAdmin):
|
|||
|
||||
class GameAdmin(VersionAdmin, PolymorphicChildModelAdmin):
|
||||
list_display = ('title', 'owner', 'duration', 'players_min',
|
||||
'players_max', 'comment', 'isbn')
|
||||
search_fields = ('isbn', 'title', 'owner__username', 'duration', 'comment')
|
||||
'players_max', 'comment')
|
||||
search_fields = ('name', 'owner__username', 'duration', 'comment')
|
||||
autocomplete_fields = ('owner',)
|
||||
show_in_index = True
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
# Generated by Django 2.2.24 on 2021-11-14 15:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0045_auto_20211114_1423'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='membership',
|
||||
name='date_end',
|
||||
field=models.DateField(verbose_name='start date'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='membership',
|
||||
name='date_start',
|
||||
field=models.DateField(verbose_name='start date'),
|
||||
),
|
||||
]
|
|
@ -59,12 +59,12 @@ class User(AbstractUser):
|
|||
data : dict
|
||||
Dictionary with user data to update.
|
||||
"""
|
||||
self.email = data['email'] or ''
|
||||
self.first_name = data['first_name'] or ''
|
||||
self.last_name = data['last_name'] or ''
|
||||
self.phone_number = data['profile']['phone_number'] or ''
|
||||
self.address = data['profile']['address'] or ''
|
||||
self.comment = data['profile']['section'] or ''
|
||||
self.email = data['email']
|
||||
self.first_name = data['first_name']
|
||||
self.last_name = data['last_name']
|
||||
self.phone_number = data['profile']['phone_number']
|
||||
self.address = data['profile']['address']
|
||||
self.comment = data['profile']['section']
|
||||
|
||||
for membership_dict in data['memberships']:
|
||||
if membership_dict['club'] != 22: # Med
|
||||
|
@ -88,10 +88,12 @@ class Membership(models.Model):
|
|||
)
|
||||
|
||||
date_start = models.DateField(
|
||||
auto_now_add=True,
|
||||
verbose_name=_('start date'),
|
||||
)
|
||||
|
||||
date_end = models.DateField(
|
||||
auto_now_add=True,
|
||||
verbose_name=_('start date'),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue