forked from DGNum/gestioCOF
Champ commentaires
le champ `comments` du modèle `CofProfile` est maintenant visible par l'urilisateur via la vue “profil”.
This commit is contained in:
parent
0398a98dbb
commit
799f2317f7
4 changed files with 366 additions and 2 deletions
103
bda/migrations/0008_py3.py
Normal file
103
bda/migrations/0008_py3.py
Normal file
|
@ -0,0 +1,103 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('bda', '0007_extends_spectacle'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='choixspectacle',
|
||||
name='double_choice',
|
||||
field=models.CharField(
|
||||
verbose_name='Nombre de places',
|
||||
choices=[('1', '1 place'),
|
||||
('autoquit', '2 places si possible, 1 sinon'),
|
||||
('double', '2 places sinon rien')],
|
||||
max_length=10, default='1'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='participant',
|
||||
name='paymenttype',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
choices=[('cash', 'Cash'), ('cb', 'CB'),
|
||||
('cheque', 'Chèque'), ('autre', 'Autre')],
|
||||
max_length=6, verbose_name='Moyen de paiement'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salle',
|
||||
name='address',
|
||||
field=models.TextField(verbose_name='Adresse'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salle',
|
||||
name='name',
|
||||
field=models.CharField(verbose_name='Nom', max_length=300),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='date',
|
||||
field=models.DateTimeField(verbose_name='Date & heure'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='description',
|
||||
field=models.TextField(verbose_name='Description', blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='listing',
|
||||
field=models.BooleanField(
|
||||
verbose_name='Les places sont sur listing'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='price',
|
||||
field=models.FloatField(verbose_name="Prix d'une place"),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='slots',
|
||||
field=models.IntegerField(verbose_name='Places'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='slots_description',
|
||||
field=models.TextField(verbose_name='Description des places',
|
||||
blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spectacle',
|
||||
name='title',
|
||||
field=models.CharField(verbose_name='Titre', max_length=300),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='tirage',
|
||||
name='active',
|
||||
field=models.BooleanField(verbose_name='Tirage actif',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='tirage',
|
||||
name='fermeture',
|
||||
field=models.DateTimeField(
|
||||
verbose_name='Date et heure de fermerture du tirage'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='tirage',
|
||||
name='ouverture',
|
||||
field=models.DateTimeField(
|
||||
verbose_name="Date et heure d'ouverture du tirage"),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='tirage',
|
||||
name='title',
|
||||
field=models.CharField(verbose_name='Titre', max_length=300),
|
||||
),
|
||||
]
|
253
gestioncof/migrations/0008_py3.py
Normal file
253
gestioncof/migrations/0008_py3.py
Normal file
|
@ -0,0 +1,253 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
def forwards(apps, schema_editor):
|
||||
Profile = apps.get_model("gestioncof", "CofProfile")
|
||||
Profile.objects.update(comments="")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('gestioncof', '0007_alter_club'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='clipper',
|
||||
name='fullname',
|
||||
field=models.CharField(verbose_name='Nom complet', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='clipper',
|
||||
name='username',
|
||||
field=models.CharField(verbose_name='Identifiant', max_length=20),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='comments',
|
||||
field=models.TextField(
|
||||
verbose_name="Commentaires visibles par l'utilisateur",
|
||||
blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='is_cof',
|
||||
field=models.BooleanField(verbose_name='Membre du COF',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='login_clipper',
|
||||
field=models.CharField(verbose_name='Login clipper', max_length=8,
|
||||
blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='mailing_bda',
|
||||
field=models.BooleanField(verbose_name='Recevoir les mails BdA',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='mailing_bda_revente',
|
||||
field=models.BooleanField(
|
||||
verbose_name='Recevoir les mails de revente de places BdA',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='mailing_cof',
|
||||
field=models.BooleanField(verbose_name='Recevoir les mails COF',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='occupation',
|
||||
field=models.CharField(verbose_name='Occupation',
|
||||
choices=[('exterieur', 'Extérieur'),
|
||||
('1A', '1A'),
|
||||
('2A', '2A'),
|
||||
('3A', '3A'),
|
||||
('4A', '4A'),
|
||||
('archicube', 'Archicube'),
|
||||
('doctorant', 'Doctorant'),
|
||||
('CST', 'CST')],
|
||||
max_length=9, default='1A'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='petits_cours_accept',
|
||||
field=models.BooleanField(verbose_name='Recevoir des petits cours',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='petits_cours_remarques',
|
||||
field=models.TextField(
|
||||
blank=True,
|
||||
verbose_name='Remarques et précisions pour les petits cours',
|
||||
default=''),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cofprofile',
|
||||
name='type_cotiz',
|
||||
field=models.CharField(
|
||||
verbose_name='Type de cotisation',
|
||||
choices=[('etudiant', 'Normalien étudiant'),
|
||||
('normalien', 'Normalien élève'),
|
||||
('exterieur', 'Extérieur')],
|
||||
max_length=9, default='normalien'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='custommail',
|
||||
name='comments',
|
||||
field=models.TextField(
|
||||
verbose_name='Informations contextuelles sur le mail',
|
||||
blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='custommail',
|
||||
name='content',
|
||||
field=models.TextField(verbose_name='Contenu'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='custommail',
|
||||
name='title',
|
||||
field=models.CharField(verbose_name='Titre', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='description',
|
||||
field=models.TextField(verbose_name='Description', blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='end_date',
|
||||
field=models.DateTimeField(null=True, verbose_name='Date de fin',
|
||||
blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='image',
|
||||
field=models.ImageField(upload_to='imgs/events/', null=True,
|
||||
verbose_name='Image', blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='location',
|
||||
field=models.CharField(verbose_name='Lieu', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='registration_open',
|
||||
field=models.BooleanField(verbose_name='Inscriptions ouvertes',
|
||||
default=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='title',
|
||||
field=models.CharField(verbose_name='Titre', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='eventcommentfield',
|
||||
name='fieldtype',
|
||||
field=models.CharField(verbose_name='Type',
|
||||
choices=[('text', 'Texte long'),
|
||||
('char', 'Texte court')],
|
||||
max_length=10, default='text'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='eventcommentfield',
|
||||
name='name',
|
||||
field=models.CharField(verbose_name='Champ', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='eventcommentvalue',
|
||||
name='content',
|
||||
field=models.TextField(null=True, verbose_name='Contenu',
|
||||
blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='eventoption',
|
||||
name='multi_choices',
|
||||
field=models.BooleanField(verbose_name='Choix multiples',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='eventoption',
|
||||
name='name',
|
||||
field=models.CharField(verbose_name='Option', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='eventoptionchoice',
|
||||
name='value',
|
||||
field=models.CharField(verbose_name='Valeur', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='petitcoursability',
|
||||
name='niveau',
|
||||
field=models.CharField(
|
||||
choices=[('college', 'Collège'), ('lycee', 'Lycée'),
|
||||
('prepa1styear', 'Prépa 1ère année / L1'),
|
||||
('prepa2ndyear', 'Prépa 2ème année / L2'),
|
||||
('licence3', 'Licence 3'),
|
||||
('other', 'Autre (préciser dans les commentaires)')],
|
||||
max_length=12, verbose_name='Niveau'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='petitcoursattribution',
|
||||
name='rank',
|
||||
field=models.IntegerField(verbose_name="Rang dans l'email"),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='petitcoursattributioncounter',
|
||||
name='count',
|
||||
field=models.IntegerField(verbose_name="Nombre d'envois",
|
||||
default=0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='petitcoursdemande',
|
||||
name='niveau',
|
||||
field=models.CharField(
|
||||
verbose_name='Niveau',
|
||||
choices=[('college', 'Collège'), ('lycee', 'Lycée'),
|
||||
('prepa1styear', 'Prépa 1ère année / L1'),
|
||||
('prepa2ndyear', 'Prépa 2ème année / L2'),
|
||||
('licence3', 'Licence 3'),
|
||||
('other', 'Autre (préciser dans les commentaires)')],
|
||||
max_length=12, default=''),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='survey',
|
||||
name='old',
|
||||
field=models.BooleanField(verbose_name='Archiver (sondage fini)',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='survey',
|
||||
name='survey_open',
|
||||
field=models.BooleanField(verbose_name='Sondage ouvert',
|
||||
default=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='survey',
|
||||
name='title',
|
||||
field=models.CharField(verbose_name='Titre', max_length=200),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='surveyquestion',
|
||||
name='multi_answers',
|
||||
field=models.BooleanField(verbose_name='Choix multiples',
|
||||
default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='surveyquestion',
|
||||
name='question',
|
||||
field=models.CharField(verbose_name='Question', max_length=200),
|
||||
),
|
||||
migrations.RunPython(forwards, migrations.RunPython.noop),
|
||||
]
|
|
@ -62,7 +62,7 @@ class CofProfile(models.Model):
|
|||
mailing_bda_revente = models.BooleanField(
|
||||
"Recevoir les mails de revente de places BdA", default=False)
|
||||
comments = models.TextField(
|
||||
"Commentaires visibles uniquement par le Buro", blank=True)
|
||||
"Commentaires visibles par l'utilisateur", blank=True)
|
||||
is_buro = models.BooleanField("Membre du Burô", default=False)
|
||||
petits_cours_accept = models.BooleanField(
|
||||
"Recevoir des petits cours", default=False)
|
||||
|
|
|
@ -13,10 +13,18 @@
|
|||
{% csrf_token %}
|
||||
<fieldset"center-block">
|
||||
{% for field in form %}
|
||||
{{ field | bootstrap}}
|
||||
{{ field | bootstrap }}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
{% if user.profile.comments %}
|
||||
<div class="row" style="margin: 0 15%;">
|
||||
<h4>Commentaires</h4>
|
||||
<p>
|
||||
{{ user.profile.comments }}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue