De retour pour les u-strings
This commit is contained in:
parent
b6d1ee6aa8
commit
aa949f84b2
8 changed files with 33 additions and 33 deletions
|
@ -46,7 +46,7 @@ class Command(BaseCommand):
|
||||||
and plieu.ville == lieu.ville
|
and plieu.ville == lieu.ville
|
||||||
and plieu.type_lieu == lieu.type_lieu
|
and plieu.type_lieu == lieu.type_lieu
|
||||||
):
|
):
|
||||||
print("%s %s" % (pprint, self.style.SUCCESS(u"-> Suppression")))
|
print("%s %s" % (pprint, self.style.SUCCESS("-> Suppression")))
|
||||||
if rundb:
|
if rundb:
|
||||||
for avis in plieu.avislieu_set.all():
|
for avis in plieu.avislieu_set.all():
|
||||||
avis.lieu = lieu
|
avis.lieu = lieu
|
||||||
|
@ -55,6 +55,6 @@ class Command(BaseCommand):
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
"%s %s"
|
"%s %s"
|
||||||
% (pprint, self.style.WARNING(u"-> À supprimer manuellement"))
|
% (pprint, self.style.WARNING("-> À supprimer manuellement"))
|
||||||
)
|
)
|
||||||
self.stdout.write(self.style.SUCCESS(u"Nettoyage des lieux effectué"))
|
self.stdout.write(self.style.SUCCESS("Nettoyage des lieux effectué"))
|
||||||
|
|
|
@ -69,4 +69,4 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
for avis, alen in problems:
|
for avis, alen in problems:
|
||||||
print(" > Avis sur %s de %d mots" % (avis.lieu, alen))
|
print(" > Avis sur %s de %d mots" % (avis.lieu, alen))
|
||||||
self.stdout.write(self.style.SUCCESS(u"Nettoyage des stages effectué"))
|
self.stdout.write(self.style.SUCCESS("Nettoyage des stages effectué"))
|
||||||
|
|
|
@ -39,4 +39,4 @@ class Command(BaseCommand):
|
||||||
avis.lieu = lieu
|
avis.lieu = lieu
|
||||||
avis.save()
|
avis.save()
|
||||||
plieu.delete()
|
plieu.delete()
|
||||||
self.stdout.write(self.style.SUCCESS(u"Terminé"))
|
self.stdout.write(self.style.SUCCESS("Terminé"))
|
||||||
|
|
|
@ -15,4 +15,4 @@ class Command(BaseCommand):
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
old_conn = timezone.now() - timedelta(days=365)
|
old_conn = timezone.now() - timedelta(days=365)
|
||||||
Normalien.objects.all().update(last_cas_connect=t)
|
Normalien.objects.all().update(last_cas_connect=t)
|
||||||
self.stdout.write(self.style.SUCCESS(u"Terminé"))
|
self.stdout.write(self.style.SUCCESS("Terminé"))
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
DEPARTEMENTS_DEFAUT = (
|
DEPARTEMENTS_DEFAUT = (
|
||||||
("phy", u"Physique"),
|
("phy", "Physique"),
|
||||||
("maths", u"Maths"),
|
("maths", "Maths"),
|
||||||
("bio", u"Biologie"),
|
("bio", "Biologie"),
|
||||||
("chimie", u"Chimie"),
|
("chimie", "Chimie"),
|
||||||
("geol", u"Géosciences"),
|
("geol", "Géosciences"),
|
||||||
("dec", u"DEC"),
|
("dec", "DEC"),
|
||||||
("info", u"Informatique"),
|
("info", "Informatique"),
|
||||||
("litt", u"Littéraire"),
|
("litt", "Littéraire"),
|
||||||
("guests", u"Pensionnaires étrangers"),
|
("guests", "Pensionnaires étrangers"),
|
||||||
("pei", u"PEI"),
|
("pei", "PEI"),
|
||||||
)
|
)
|
||||||
|
|
||||||
TYPE_STAGE_OPTIONS = (
|
TYPE_STAGE_OPTIONS = (
|
||||||
(
|
(
|
||||||
u"Recherche :",
|
"Recherche :",
|
||||||
(
|
(
|
||||||
("recherche", "Stage académique"),
|
("recherche", "Stage académique"),
|
||||||
("recherche_autre", "Stage non-académique"),
|
("recherche_autre", "Stage non-académique"),
|
||||||
|
@ -21,14 +21,14 @@ TYPE_STAGE_OPTIONS = (
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
u"Stage sans visée de recherche :",
|
"Stage sans visée de recherche :",
|
||||||
(
|
(
|
||||||
("pro", "Stage en entreprise"),
|
("pro", "Stage en entreprise"),
|
||||||
("admin", "Stage en admin./ONG/orga. internationale"),
|
("admin", "Stage en admin./ONG/orga. internationale"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
u"Enseignement :",
|
"Enseignement :",
|
||||||
(
|
(
|
||||||
("lectorat", "Lectorat DRI"),
|
("lectorat", "Lectorat DRI"),
|
||||||
("autre_teach", "Autre expérience d'enseignement"),
|
("autre_teach", "Autre expérience d'enseignement"),
|
||||||
|
|
|
@ -21,9 +21,9 @@ def feedback_widget():
|
||||||
|
|
||||||
@register.filter
|
@register.filter
|
||||||
def typonazisme(value):
|
def typonazisme(value):
|
||||||
value = re.sub(r"(\w)\s*([?!:])", u"\\1 \\2", value)
|
value = re.sub(r"(\w)\s*([?!:])", "\\1 \\2", value)
|
||||||
value = re.sub(r"(\w)\s*([,.])", u"\\1\\2", value)
|
value = re.sub(r"(\w)\s*([,.])", "\\1\\2", value)
|
||||||
value = re.sub(r"([?!:,.])(\w)", u"\\1 \\2", value)
|
value = re.sub(r"([?!:,.])(\w)", "\\1 \\2", value)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,33 +25,33 @@ logger = logging.getLogger("recherche")
|
||||||
# Recherche
|
# Recherche
|
||||||
class SearchForm(forms.Form):
|
class SearchForm(forms.Form):
|
||||||
generique = forms.CharField(required=False)
|
generique = forms.CharField(required=False)
|
||||||
sujet = forms.CharField(label=u"À propos de", required=False)
|
sujet = forms.CharField(label="À propos de", required=False)
|
||||||
contexte = forms.CharField(
|
contexte = forms.CharField(
|
||||||
label=u"Contexte (lieu, encadrant⋅e⋅s, structure)", required=False
|
label="Contexte (lieu, encadrant⋅e⋅s, structure)", required=False
|
||||||
)
|
)
|
||||||
|
|
||||||
apres_annee = forms.IntegerField(label=u"Après cette année", required=False)
|
apres_annee = forms.IntegerField(label="Après cette année", required=False)
|
||||||
avant_annee = forms.IntegerField(label=u"Avant cette année", required=False)
|
avant_annee = forms.IntegerField(label="Avant cette année", required=False)
|
||||||
|
|
||||||
type_stage = forms.ChoiceField(
|
type_stage = forms.ChoiceField(
|
||||||
label="Type de stage",
|
label="Type de stage",
|
||||||
choices=([("", u"")] + list(TYPE_STAGE_OPTIONS)),
|
choices=([("", "")] + list(TYPE_STAGE_OPTIONS)),
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
niveau_scol = forms.ChoiceField(
|
niveau_scol = forms.ChoiceField(
|
||||||
label="Année d'étude",
|
label="Année d'étude",
|
||||||
choices=([("", u"")] + list(NIVEAU_SCOL_OPTIONS)),
|
choices=([("", "")] + list(NIVEAU_SCOL_OPTIONS)),
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
type_lieu = forms.ChoiceField(
|
type_lieu = forms.ChoiceField(
|
||||||
label="Type de lieu d'accueil",
|
label="Type de lieu d'accueil",
|
||||||
choices=([("", u"")] + list(TYPE_LIEU_OPTIONS)),
|
choices=([("", "")] + list(TYPE_LIEU_OPTIONS)),
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
tri = forms.ChoiceField(
|
tri = forms.ChoiceField(
|
||||||
label=u"Tri par",
|
label="Tri par",
|
||||||
choices=[("pertinence", u"Pertinence"), ("-date_maj", u"Dernière mise à jour")],
|
choices=[("pertinence", "Pertinence"), ("-date_maj", "Dernière mise à jour")],
|
||||||
required=False,
|
required=False,
|
||||||
initial="pertinence",
|
initial="pertinence",
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,8 +23,8 @@ class LatLonField(forms.MultiValueField):
|
||||||
srid = 4326
|
srid = 4326
|
||||||
|
|
||||||
default_error_messages = {
|
default_error_messages = {
|
||||||
"invalid_latitude": (u"Entrez une latitude valide."),
|
"invalid_latitude": ("Entrez une latitude valide."),
|
||||||
"invalid_longitude": (u"Entrez une longitude valide."),
|
"invalid_longitude": ("Entrez une longitude valide."),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue