3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-12-23 15:33:45 +00:00

Remove vice-president, grocer, brewer and add phoenixTM_responsible

This commit is contained in:
Yoann Pétri 2019-04-28 13:30:07 +02:00
parent b82fef0634
commit 9464fe3caf
6 changed files with 12 additions and 54 deletions

View file

@ -12,14 +12,6 @@ def president():
gp,_ = GeneralPreferences.objects.get_or_create(pk=1) gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
return gp.president return gp.president
@register.simple_tag
def vice_president():
"""
A tag which returns :attr:`preferences.models.GeneralPreferences.vice_president`.
"""
gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
return gp.vice_president
@register.simple_tag @register.simple_tag
def treasurer(): def treasurer():
""" """
@ -37,20 +29,12 @@ def secretary():
return gp.secretary return gp.secretary
@register.simple_tag @register.simple_tag
def brewer(): def phoenix():
""" """
A tag which returns :attr:`preferences.models.GeneralPreferences.brewer`. A tag which returns :attr:`preferences.models.GeneralPreferences.phoenixTM_responsible`.
""" """
gp,_ = GeneralPreferences.objects.get_or_create(pk=1) gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
return gp.brewer return gp.phoenixTM_responsible
@register.simple_tag
def grocer():
"""
A tag which returns :attr:`preferences.models.GeneralPreferences.grocer`.
"""
gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
return gp.grocer
@register.simple_tag @register.simple_tag
def global_message(): def global_message():

View file

@ -13,7 +13,7 @@ class GeneralPreferencesAdmin(SimpleHistoryAdmin):
""" """
The admin class for :class:`Consumptions <preferences.models.GeneralPreferences>`. The admin class for :class:`Consumptions <preferences.models.GeneralPreferences>`.
""" """
list_display = ('is_active', 'president', 'vice_president', 'treasurer', 'secretary', 'brewer', 'grocer', 'use_pinte_monitoring', 'lost_pintes_allowed', 'floating_buttons', 'automatic_logout_time') list_display = ('is_active', 'president', 'treasurer', 'secretary', 'phoenixTM_responsible', 'use_pinte_monitoring', 'lost_pintes_allowed', 'floating_buttons', 'automatic_logout_time')
class PaymentMethodAdmin(SimpleHistoryAdmin): class PaymentMethodAdmin(SimpleHistoryAdmin):
""" """

View file

@ -31,11 +31,9 @@ class GeneralPreferencesForm(forms.ModelForm):
'global_message': forms.Textarea(attrs={'placeholder': 'Message global à afficher sur le site'}), 'global_message': forms.Textarea(attrs={'placeholder': 'Message global à afficher sur le site'}),
'active_message': forms.Textarea(attrs={'placeholder': 'Ce message s\'affichera si le site n\'est pas actif'}), 'active_message': forms.Textarea(attrs={'placeholder': 'Ce message s\'affichera si le site n\'est pas actif'}),
'president': forms.TextInput(attrs={'placeholder': 'Président'}), 'president': forms.TextInput(attrs={'placeholder': 'Président'}),
'vice_president': forms.TextInput(attrs={'placeholder': 'Vice-président'}),
'secretary': forms.TextInput(attrs={'placeholder': 'Secrétaire'}), 'secretary': forms.TextInput(attrs={'placeholder': 'Secrétaire'}),
'treasurer': forms.TextInput(attrs={'placeholder': 'Trésorier'}), 'treasurer': forms.TextInput(attrs={'placeholder': 'Trésorier'}),
'brewer': forms.TextInput(attrs={'placeholder': 'Maître brasseur'}), 'phoenixTM_responsible': forms.TextInput(attrs={'placeholder': 'Responsable Phœnix Technopôle Metz'}),
'grocer': forms.TextInput(attrs={'placeholder': 'Epic épicier'}),
'home_text': forms.Textarea(attrs={'placeholder': 'Ce message sera affiché sur la page d\'accueil'}) 'home_text': forms.Textarea(attrs={'placeholder': 'Ce message sera affiché sur la page d\'accueil'})
} }

View file

@ -64,10 +64,6 @@ class GeneralPreferences(models.Model):
""" """
The name of the president The name of the president
""" """
vice_president = models.CharField(max_length=255, blank=True, verbose_name="Vice Président")
"""
The name of the vice-president
"""
treasurer = models.CharField(max_length=255, blank=True, verbose_name="Trésorier") treasurer = models.CharField(max_length=255, blank=True, verbose_name="Trésorier")
""" """
The name of the treasurer The name of the treasurer
@ -76,13 +72,9 @@ class GeneralPreferences(models.Model):
""" """
The name of the secretary The name of the secretary
""" """
brewer = models.CharField(max_length=255, blank=True, verbose_name="Maître Brasseur") phoenixTM_responsible = models.CharField(max_length=255, blank=True, verbose_name="Responsable Phœnix Technopôle Metz")
""" """
The name of the brewer The name of the people in charge of the club
"""
grocer = models.CharField(max_length=255, blank=True, verbose_name="Épic Épicier")
"""
The name of the grocer
""" """
use_pinte_monitoring = models.BooleanField(default=False, verbose_name="Suivi de pintes") use_pinte_monitoring = models.BooleanField(default=False, verbose_name="Suivi de pintes")
""" """

View file

@ -69,23 +69,15 @@
{{form.president}} {{form.president}}
</div> </div>
<div class="6u"> <div class="6u">
{{form.vice_president}} {{form.secretary}}
</div> </div>
</div> </div>
<div class="row uniform"> <div class="row uniform">
<div class="6u">
{{form.secretary}}
</div>
<div class="6u"> <div class="6u">
{{form.treasurer}} {{form.treasurer}}
</div> </div>
</div>
<div class="row uniform">
<div class="6u"> <div class="6u">
{{form.grocer}} {{form.phoenixTM_responsible}}
</div>
<div class="6u">
{{form.brewer}}
</div> </div>
</div> </div>
<div class="row uniform"> <div class="row uniform">

View file

@ -22,13 +22,9 @@
<td>coopemetz@gmail.com</td> <td>coopemetz@gmail.com</td>
</tr> </tr>
<tr> <tr>
<td>Prez</td> <td>Président</td>
<td>{% president %}</td> <td>{% president %}</td>
</tr> </tr>
<tr>
<td>V-Prez</td>
<td>{% vice_president %}</td>
</tr>
<tr> <tr>
<td>Trésorier</td> <td>Trésorier</td>
<td>{% treasurer %}</td> <td>{% treasurer %}</td>
@ -38,12 +34,8 @@
<td>{% secretary %}</td> <td>{% secretary %}</td>
</tr> </tr>
<tr> <tr>
<td>Maitre brasseur</td> <td>Responsable Phœnix Technopôle Metz</td>
<td>{% brewer %}</td> <td>{% phoenix %}</td>
</tr>
<tr>
<td>Epic Epicier</td>
<td>{% grocer %}</td>
</tr> </tr>
</table> </table>
<ul class="icons"> <ul class="icons">