mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 19:33:11 +00:00
Merge branch 'release-3.4.1'
This commit is contained in:
commit
e79c42fab4
14 changed files with 138 additions and 58 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -44,3 +44,4 @@ venv
|
||||||
static/
|
static/
|
||||||
Pipfile
|
Pipfile
|
||||||
mediafiles
|
mediafiles
|
||||||
|
Pipfile.lock
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
## v3.4.1
|
||||||
|
* Rajout d'un bouton actif sur les KegForm
|
||||||
|
* Suppression épic épicier, maitre brasseur et vice-président.
|
||||||
|
* Rajout responsable Phoenix Technopôle Metz
|
||||||
|
* Rajout de la charte alcool
|
||||||
## v3.4.0
|
## v3.4.0
|
||||||
* Fix bugs et améliorations
|
* Fix bugs et améliorations
|
||||||
* Réparation de la génération de documents en latex
|
* Réparation de la génération de documents en latex
|
||||||
|
|
|
@ -124,6 +124,6 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||||
|
|
||||||
LOGIN_URL = '/users/login'
|
LOGIN_URL = '/users/login'
|
||||||
|
|
||||||
MEDIA_ROOT = 'mediafiles/'
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'mediafiles')
|
||||||
MEDIA_URL = '/media/'
|
MEDIA_URL = '/media/'
|
||||||
|
|
||||||
|
|
|
@ -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():
|
||||||
|
@ -102,3 +86,14 @@ def menu():
|
||||||
return '<a target="_blank" href="' + gp.menu.url + '">' + str(gp.menu) + '</a>'
|
return '<a target="_blank" href="' + gp.menu.url + '">' + str(gp.menu) + '</a>'
|
||||||
except:
|
except:
|
||||||
return "Pas de document"
|
return "Pas de document"
|
||||||
|
|
||||||
|
@register.simple_tag
|
||||||
|
def alcool_charter():
|
||||||
|
"""
|
||||||
|
A tag which returns :attr:`preferences.models.GeneralPreferences.alcool_charter`.
|
||||||
|
"""
|
||||||
|
gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
|
||||||
|
try:
|
||||||
|
return '<a target="_blank" href="' + gp.alcohol_charter.url + '">' + str(gp.alcohol_charter) + '</a>'
|
||||||
|
except:
|
||||||
|
return "Pas de document"
|
||||||
|
|
|
@ -8,7 +8,7 @@ from django.template.loader import get_template
|
||||||
from django_tex.exceptions import TexError
|
from django_tex.exceptions import TexError
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
DEFAULT_INTERPRETER = 'lualatex'
|
DEFAULT_INTERPRETER = 'pdflatex'
|
||||||
|
|
||||||
def run_tex(source):
|
def run_tex(source):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -52,7 +52,7 @@ class KegForm(forms.ModelForm):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Keg
|
model = Keg
|
||||||
exclude = ("is_active", )
|
fields = "__all__"
|
||||||
widgets = {'amount': forms.TextInput}
|
widgets = {'amount': forms.TextInput}
|
||||||
|
|
||||||
class MenuForm(forms.ModelForm):
|
class MenuForm(forms.ModelForm):
|
||||||
|
|
|
@ -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):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -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'})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
preferences/migrations/0010_auto_20190428_1319.py
Normal file
23
preferences/migrations/0010_auto_20190428_1319.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 2.1 on 2019-04-28 11:19
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('preferences', '0009_auto_20190227_0859'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='generalpreferences',
|
||||||
|
name='alchohol_charter',
|
||||||
|
field=models.FileField(blank=True, null=True, upload_to='', verbose_name='Charte alcool'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='historicalgeneralpreferences',
|
||||||
|
name='alchohol_charter',
|
||||||
|
field=models.TextField(blank=True, max_length=100, null=True, verbose_name='Charte alcool'),
|
||||||
|
),
|
||||||
|
]
|
23
preferences/migrations/0011_auto_20190428_1321.py
Normal file
23
preferences/migrations/0011_auto_20190428_1321.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 2.1 on 2019-04-28 11:21
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('preferences', '0010_auto_20190428_1319'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='generalpreferences',
|
||||||
|
old_name='alchohol_charter',
|
||||||
|
new_name='alcohol_charter',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='historicalgeneralpreferences',
|
||||||
|
old_name='alchohol_charter',
|
||||||
|
new_name='alcohol_charter',
|
||||||
|
),
|
||||||
|
]
|
47
preferences/migrations/0012_auto_20190428_1327.py
Normal file
47
preferences/migrations/0012_auto_20190428_1327.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Generated by Django 2.1 on 2019-04-28 11:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('preferences', '0011_auto_20190428_1321'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='generalpreferences',
|
||||||
|
name='brewer',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='generalpreferences',
|
||||||
|
name='grocer',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='generalpreferences',
|
||||||
|
name='vice_president',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='historicalgeneralpreferences',
|
||||||
|
name='brewer',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='historicalgeneralpreferences',
|
||||||
|
name='grocer',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='historicalgeneralpreferences',
|
||||||
|
name='vice_president',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='generalpreferences',
|
||||||
|
name='phoenixTM_responsible',
|
||||||
|
field=models.CharField(blank=True, max_length=255, verbose_name='Responsable Phœnix Technopôle Metz'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='historicalgeneralpreferences',
|
||||||
|
name='phoenixTM_responsible',
|
||||||
|
field=models.CharField(blank=True, max_length=255, verbose_name='Responsable Phœnix Technopôle Metz'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -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")
|
||||||
"""
|
"""
|
||||||
|
@ -116,6 +108,10 @@ class GeneralPreferences(models.Model):
|
||||||
"""
|
"""
|
||||||
The file of the menu
|
The file of the menu
|
||||||
"""
|
"""
|
||||||
|
alcohol_charter = models.FileField(blank=True, null=True, verbose_name="Charte alcool")
|
||||||
|
"""
|
||||||
|
The file of the alcohol charter
|
||||||
|
"""
|
||||||
history = HistoricalRecords()
|
history = HistoricalRecords()
|
||||||
|
|
||||||
class Cotisation(models.Model):
|
class Cotisation(models.Model):
|
||||||
|
|
|
@ -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">
|
||||||
|
@ -146,6 +138,12 @@
|
||||||
<label for="{{form.menu.id_for_label}}">Menu / Carte</label>
|
<label for="{{form.menu.id_for_label}}">Menu / Carte</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row uniform">
|
||||||
|
<div class="12u">
|
||||||
|
{{form.alcohol_charter}}
|
||||||
|
<label for="{{form.menu.id_for_label}}">Charte alcool</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row uniform">
|
<div class="row uniform">
|
||||||
<div class="12u">
|
<div class="12u">
|
||||||
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
<button type="submit"><i class="fa fa-save"></i> Enregistrer</button>
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
<dd>{% autoescape off %}{% rules %}{% endautoescape %}</dd>
|
<dd>{% autoescape off %}{% rules %}{% endautoescape %}</dd>
|
||||||
<dt>Carte</dt>
|
<dt>Carte</dt>
|
||||||
<dd>{% autoescape off %}{% menu %}{% endautoescape %}</dd>
|
<dd>{% autoescape off %}{% menu %}{% endautoescape %}</dd>
|
||||||
|
<dt>Charte alcool</dt>
|
||||||
|
<dd>{% autoescape off %}{% alcool_charter %}{% endautoescape %}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
|
@ -20,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>
|
||||||
|
@ -36,18 +34,14 @@
|
||||||
<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">
|
||||||
<li><a href="https://www.facebook.com/coopesmetz/" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
|
<li><a href="https://www.facebook.com/coopesmetz/" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<p class="copyright">coope.rez v3.4.0 (release stable) © 2018 Yoann Pietri.</p>
|
<p class="copyright">coope.rez v3.4.1 (release stable) © 2018-2019 Yoann Pietri.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue