mirror of
https://github.com/nanoy42/coope
synced 2024-12-23 07:23:47 +00:00
Remove vice-president, grocer, brewer and add phoenixTM_responsible
This commit is contained in:
parent
b82fef0634
commit
9464fe3caf
6 changed files with 12 additions and 54 deletions
|
@ -12,14 +12,6 @@ def president():
|
|||
gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
|
||||
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
|
||||
def treasurer():
|
||||
"""
|
||||
|
@ -37,20 +29,12 @@ def secretary():
|
|||
return gp.secretary
|
||||
|
||||
@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)
|
||||
return gp.brewer
|
||||
|
||||
@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
|
||||
return gp.phoenixTM_responsible
|
||||
|
||||
@register.simple_tag
|
||||
def global_message():
|
||||
|
|
|
@ -13,7 +13,7 @@ class GeneralPreferencesAdmin(SimpleHistoryAdmin):
|
|||
"""
|
||||
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):
|
||||
"""
|
||||
|
|
|
@ -31,11 +31,9 @@ class GeneralPreferencesForm(forms.ModelForm):
|
|||
'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'}),
|
||||
'president': forms.TextInput(attrs={'placeholder': 'Président'}),
|
||||
'vice_president': forms.TextInput(attrs={'placeholder': 'Vice-président'}),
|
||||
'secretary': forms.TextInput(attrs={'placeholder': 'Secrétaire'}),
|
||||
'treasurer': forms.TextInput(attrs={'placeholder': 'Trésorier'}),
|
||||
'brewer': forms.TextInput(attrs={'placeholder': 'Maître brasseur'}),
|
||||
'grocer': forms.TextInput(attrs={'placeholder': 'Epic épicier'}),
|
||||
'phoenixTM_responsible': forms.TextInput(attrs={'placeholder': 'Responsable Phœnix Technopôle Metz'}),
|
||||
'home_text': forms.Textarea(attrs={'placeholder': 'Ce message sera affiché sur la page d\'accueil'})
|
||||
}
|
||||
|
||||
|
|
|
@ -64,10 +64,6 @@ class GeneralPreferences(models.Model):
|
|||
"""
|
||||
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")
|
||||
"""
|
||||
The name of the treasurer
|
||||
|
@ -76,13 +72,9 @@ class GeneralPreferences(models.Model):
|
|||
"""
|
||||
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
|
||||
"""
|
||||
grocer = models.CharField(max_length=255, blank=True, verbose_name="Épic Épicier")
|
||||
"""
|
||||
The name of the grocer
|
||||
The name of the people in charge of the club
|
||||
"""
|
||||
use_pinte_monitoring = models.BooleanField(default=False, verbose_name="Suivi de pintes")
|
||||
"""
|
||||
|
|
|
@ -69,23 +69,15 @@
|
|||
{{form.president}}
|
||||
</div>
|
||||
<div class="6u">
|
||||
{{form.vice_president}}
|
||||
{{form.secretary}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="6u">
|
||||
{{form.secretary}}
|
||||
</div>
|
||||
<div class="6u">
|
||||
{{form.treasurer}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="6u">
|
||||
{{form.grocer}}
|
||||
</div>
|
||||
<div class="6u">
|
||||
{{form.brewer}}
|
||||
{{form.phoenixTM_responsible}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row uniform">
|
||||
|
|
|
@ -22,13 +22,9 @@
|
|||
<td>coopemetz@gmail.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prez</td>
|
||||
<td>Président</td>
|
||||
<td>{% president %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>V-Prez</td>
|
||||
<td>{% vice_president %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trésorier</td>
|
||||
<td>{% treasurer %}</td>
|
||||
|
@ -38,12 +34,8 @@
|
|||
<td>{% secretary %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Maitre brasseur</td>
|
||||
<td>{% brewer %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Epic Epicier</td>
|
||||
<td>{% grocer %}</td>
|
||||
<td>Responsable Phœnix Technopôle Metz</td>
|
||||
<td>{% phoenix %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="icons">
|
||||
|
|
Loading…
Reference in a new issue