mirror of https://gitlab.crans.org/bde/nk20
Add basic roles for BDE and Kfet
This commit is contained in:
parent
ff820ef086
commit
f2baeedc01
|
@ -15,7 +15,7 @@ from django.views.decorators.csrf import csrf_protect
|
|||
from django.views.generic import CreateView, TemplateView, DetailView, FormView
|
||||
from django_tables2 import SingleTableView
|
||||
from member.forms import ProfileForm
|
||||
from member.models import Membership, Club
|
||||
from member.models import Membership, Club, Role
|
||||
from note.models import SpecialTransaction, NoteSpecial
|
||||
from note.templatetags.pretty_money import pretty_money
|
||||
from permission.backends import PermissionBackend
|
||||
|
@ -262,18 +262,22 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView,
|
|||
)
|
||||
|
||||
if join_BDE:
|
||||
Membership.objects.create(
|
||||
membership = Membership.objects.create(
|
||||
club=bde,
|
||||
user=user,
|
||||
fee=bde_fee,
|
||||
)
|
||||
membership.roles.add(Role.objects.get(name="Adhérent BDE"))
|
||||
membership.save()
|
||||
|
||||
if join_Kfet:
|
||||
Membership.objects.create(
|
||||
membership = Membership.objects.create(
|
||||
club=kfet,
|
||||
user=user,
|
||||
fee=kfet_fee,
|
||||
)
|
||||
membership.roles.add(Role.objects.get(name="Adhérent Kfet"))
|
||||
membership.save()
|
||||
|
||||
return ret
|
||||
|
||||
|
|
|
@ -1135,12 +1135,12 @@ msgstr "Gérer les jetons d'authentification"
|
|||
#: templates/member/profile_tables.html:7
|
||||
#: templates/registration/future_profile_detail.html:28
|
||||
msgid "This user doesn't have confirmed his/her e-mail address."
|
||||
msgstr ""
|
||||
msgstr "Cet utilisateur n'a pas encore confirmé son adresse e-mail."
|
||||
|
||||
#: templates/member/profile_tables.html:8
|
||||
#: templates/registration/future_profile_detail.html:29
|
||||
msgid "Click here to resend a validation link."
|
||||
msgstr ""
|
||||
msgstr "Cliquez ici pour renvoyer un lien de validation."
|
||||
|
||||
#: templates/member/profile_tables.html:18
|
||||
msgid "View my memberships"
|
||||
|
@ -1247,15 +1247,15 @@ msgstr ""
|
|||
|
||||
#: templates/registration/future_profile_detail.html:56
|
||||
msgid "Delete registration"
|
||||
msgstr ""
|
||||
msgstr "Supprimer l'inscription"
|
||||
|
||||
#: templates/registration/future_profile_detail.html:64
|
||||
msgid "Validate account"
|
||||
msgstr ""
|
||||
msgstr "Valider le compte"
|
||||
|
||||
#: templates/registration/future_profile_detail.html:71
|
||||
msgid "Validate registration"
|
||||
msgstr ""
|
||||
msgstr "Valider l'inscription"
|
||||
|
||||
#: templates/registration/future_user_list.html:7
|
||||
msgid "New user"
|
||||
|
|
Loading…
Reference in New Issue