mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-26 18:37:12 +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
|
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
|
|
||||||
class ActivityType(models.Model):
|
class ActivityType(models.Model):
|
||||||
|
@ -10,6 +10,7 @@ class CustomUserChangeForm(UserChangeForm):
|
|||||||
Make first name, last name and email required
|
Make first name, last name and email required
|
||||||
in the default Django Auth User model
|
in the default Django Auth User model
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.fields['first_name'].required = True
|
self.fields['first_name'].required = True
|
||||||
|
@ -72,18 +72,21 @@ class Club(models.Model):
|
|||||||
membership_duration = models.DurationField(
|
membership_duration = models.DurationField(
|
||||||
null=True,
|
null=True,
|
||||||
verbose_name=_('membership duration'),
|
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(
|
membership_start = models.DurationField(
|
||||||
null=True,
|
null=True,
|
||||||
verbose_name=_('membership start'),
|
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(
|
membership_end = models.DurationField(
|
||||||
null=True,
|
null=True,
|
||||||
verbose_name=_('membership end'),
|
verbose_name=_('membership end'),
|
||||||
help_text=_('How long the membership can last after January 1st of the next year '
|
help_text=_('How long the membership can last after January 1st '
|
||||||
'after members can renew their membership.'),
|
'of the next year after members can renew their '
|
||||||
|
'membership.'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
from django.contrib import admin
|
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.
|
# Register your models here.
|
||||||
admin.site.register(NoteClub)
|
|
||||||
admin.site.register(NoteUser)
|
|
||||||
admin.site.register(NoteSpecial)
|
|
||||||
admin.site.register(Alias)
|
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
|
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
from .notes import *
|
from .notes import Alias, Note, NoteClub, NoteSpecial, NoteUser
|
||||||
from .transactions import *
|
from .transactions import MembershipTransaction, Transaction, \
|
||||||
|
TransactionTemplate
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
# Notes
|
||||||
|
'Alias', 'Note', 'NoteClub', 'NoteSpecial', 'NoteUser',
|
||||||
|
# Transactions
|
||||||
|
'MembershipTransaction', 'Transaction', 'TransactionTemplate',
|
||||||
|
]
|
||||||
|
5
tox.ini
5
tox.ini
@ -27,7 +27,7 @@ deps =
|
|||||||
pyflakes
|
pyflakes
|
||||||
pylint
|
pylint
|
||||||
commands =
|
commands =
|
||||||
flake8 note_*
|
flake8 activity member note
|
||||||
pylint .
|
pylint .
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
@ -41,7 +41,8 @@ exclude =
|
|||||||
*.pyc,
|
*.pyc,
|
||||||
*.egg-info,
|
*.egg-info,
|
||||||
.cache,
|
.cache,
|
||||||
.eggs
|
.eggs,
|
||||||
|
*migrations*
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
import-order-style = google
|
import-order-style = google
|
||||||
application-import-names = flake8
|
application-import-names = flake8
|
||||||
|
Loading…
Reference in New Issue
Block a user