Verified Commit 2313ebcd authored by erdnaxe's avatar erdnaxe 🎇

Flake8 complient

parent fbe2e7f5
Pipeline #1342 passed with stage
in 2 minutes and 20 seconds
......@@ -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.'),
)
......
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(Alias)
admin.site.register(NoteClub)
admin.site.register(NoteUser)
admin.site.register(NoteSpecial)
admin.site.register(Alias)
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',
]
......@@ -27,7 +27,7 @@ deps =
pyflakes
pylint
commands =
flake8 note_*
flake8 activity member note
pylint .
[flake8]
......@@ -41,7 +41,8 @@ exclude =
*.pyc,
*.egg-info,
.cache,
.eggs
.eggs,
*migrations*
max-complexity = 10
import-order-style = google
application-import-names = flake8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment