mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-23 07:52:23 +00:00
Flake8 complient
This commit is contained in:
parent
fbe2e7f59a
commit
2313ebcdb4
@ -2,9 +2,9 @@
|
||||
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class ActivityType(models.Model):
|
||||
|
@ -10,6 +10,7 @@ class CustomUserChangeForm(UserChangeForm):
|
||||
Make first name, last name and email required
|
||||
in the default Django Auth User model
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['first_name'].required = True
|
||||
|
@ -72,18 +72,21 @@ class Club(models.Model):
|
||||
membership_duration = models.DurationField(
|
||||
null=True,
|
||||
verbose_name=_('membership duration'),
|
||||
help_text=_('The longest time a membership can last (NULL = infinite).'),
|
||||
help_text=_('The longest time a membership can last '
|
||||
'(NULL = infinite).'),
|
||||
)
|
||||
membership_start = models.DurationField(
|
||||
null=True,
|
||||
verbose_name=_('membership start'),
|
||||
help_text=_('How long after January 1st the members can renew their membership.'),
|
||||
help_text=_('How long after January 1st the members can renew '
|
||||
'their membership.'),
|
||||
)
|
||||
membership_end = models.DurationField(
|
||||
null=True,
|
||||
verbose_name=_('membership end'),
|
||||
help_text=_('How long the membership can last after January 1st of the next year '
|
||||
'after members can renew their membership.'),
|
||||
help_text=_('How long the membership can last after January 1st '
|
||||
'of the next year after members can renew their '
|
||||
'membership.'),
|
||||
)
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models.notes import NoteClub, NoteUser, NoteSpecial, Alias
|
||||
from .models.notes import Alias, NoteClub, NoteSpecial, NoteUser
|
||||
|
||||
# Register your models here.
|
||||
admin.site.register(NoteClub)
|
||||
admin.site.register(NoteUser)
|
||||
admin.site.register(NoteSpecial)
|
||||
admin.site.register(Alias)
|
||||
admin.site.register(NoteClub)
|
||||
admin.site.register(NoteSpecial)
|
||||
admin.site.register(NoteUser)
|
||||
|
@ -2,5 +2,13 @@
|
||||
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from .notes import *
|
||||
from .transactions import *
|
||||
from .notes import Alias, Note, NoteClub, NoteSpecial, NoteUser
|
||||
from .transactions import MembershipTransaction, Transaction, \
|
||||
TransactionTemplate
|
||||
|
||||
__all__ = [
|
||||
# Notes
|
||||
'Alias', 'Note', 'NoteClub', 'NoteSpecial', 'NoteUser',
|
||||
# Transactions
|
||||
'MembershipTransaction', 'Transaction', 'TransactionTemplate',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user