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.type_lieu == lieu.type_lieu
|
||||
):
|
||||
print("%s %s" % (pprint, self.style.SUCCESS(u"-> Suppression")))
|
||||
print("%s %s" % (pprint, self.style.SUCCESS("-> Suppression")))
|
||||
if rundb:
|
||||
for avis in plieu.avislieu_set.all():
|
||||
avis.lieu = lieu
|
||||
|
@ -55,6 +55,6 @@ class Command(BaseCommand):
|
|||
else:
|
||||
print(
|
||||
"%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:
|
||||
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.save()
|
||||
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):
|
||||
old_conn = timezone.now() - timedelta(days=365)
|
||||
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 = (
|
||||
("phy", u"Physique"),
|
||||
("maths", u"Maths"),
|
||||
("bio", u"Biologie"),
|
||||
("chimie", u"Chimie"),
|
||||
("geol", u"Géosciences"),
|
||||
("dec", u"DEC"),
|
||||
("info", u"Informatique"),
|
||||
("litt", u"Littéraire"),
|
||||
("guests", u"Pensionnaires étrangers"),
|
||||
("pei", u"PEI"),
|
||||
("phy", "Physique"),
|
||||
("maths", "Maths"),
|
||||
("bio", "Biologie"),
|
||||
("chimie", "Chimie"),
|
||||
("geol", "Géosciences"),
|
||||
("dec", "DEC"),
|
||||
("info", "Informatique"),
|
||||
("litt", "Littéraire"),
|
||||
("guests", "Pensionnaires étrangers"),
|
||||
("pei", "PEI"),
|
||||
)
|
||||
|
||||
TYPE_STAGE_OPTIONS = (
|
||||
(
|
||||
u"Recherche :",
|
||||
"Recherche :",
|
||||
(
|
||||
("recherche", "Stage 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"),
|
||||
("admin", "Stage en admin./ONG/orga. internationale"),
|
||||
),
|
||||
),
|
||||
(
|
||||
u"Enseignement :",
|
||||
"Enseignement :",
|
||||
(
|
||||
("lectorat", "Lectorat DRI"),
|
||||
("autre_teach", "Autre expérience d'enseignement"),
|
||||
|
|
|
@ -21,9 +21,9 @@ def feedback_widget():
|
|||
|
||||
@register.filter
|
||||
def typonazisme(value):
|
||||
value = re.sub(r"(\w)\s*([?!:])", u"\\1 \\2", value)
|
||||
value = re.sub(r"(\w)\s*([,.])", u"\\1\\2", value)
|
||||
value = re.sub(r"([?!:,.])(\w)", u"\\1 \\2", value)
|
||||
value = re.sub(r"(\w)\s*([?!:])", "\\1 \\2", value)
|
||||
value = re.sub(r"(\w)\s*([,.])", "\\1\\2", value)
|
||||
value = re.sub(r"([?!:,.])(\w)", "\\1 \\2", value)
|
||||
return value
|
||||
|
||||
|
||||
|
|
|
@ -25,33 +25,33 @@ logger = logging.getLogger("recherche")
|
|||
# Recherche
|
||||
class SearchForm(forms.Form):
|
||||
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(
|
||||
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)
|
||||
avant_annee = forms.IntegerField(label=u"Avant cette année", required=False)
|
||||
apres_annee = forms.IntegerField(label="Après cette année", required=False)
|
||||
avant_annee = forms.IntegerField(label="Avant cette année", required=False)
|
||||
|
||||
type_stage = forms.ChoiceField(
|
||||
label="Type de stage",
|
||||
choices=([("", u"")] + list(TYPE_STAGE_OPTIONS)),
|
||||
choices=([("", "")] + list(TYPE_STAGE_OPTIONS)),
|
||||
required=False,
|
||||
)
|
||||
niveau_scol = forms.ChoiceField(
|
||||
label="Année d'étude",
|
||||
choices=([("", u"")] + list(NIVEAU_SCOL_OPTIONS)),
|
||||
choices=([("", "")] + list(NIVEAU_SCOL_OPTIONS)),
|
||||
required=False,
|
||||
)
|
||||
|
||||
type_lieu = forms.ChoiceField(
|
||||
label="Type de lieu d'accueil",
|
||||
choices=([("", u"")] + list(TYPE_LIEU_OPTIONS)),
|
||||
choices=([("", "")] + list(TYPE_LIEU_OPTIONS)),
|
||||
required=False,
|
||||
)
|
||||
tri = forms.ChoiceField(
|
||||
label=u"Tri par",
|
||||
choices=[("pertinence", u"Pertinence"), ("-date_maj", u"Dernière mise à jour")],
|
||||
label="Tri par",
|
||||
choices=[("pertinence", "Pertinence"), ("-date_maj", "Dernière mise à jour")],
|
||||
required=False,
|
||||
initial="pertinence",
|
||||
)
|
||||
|
|
|
@ -23,8 +23,8 @@ class LatLonField(forms.MultiValueField):
|
|||
srid = 4326
|
||||
|
||||
default_error_messages = {
|
||||
"invalid_latitude": (u"Entrez une latitude valide."),
|
||||
"invalid_longitude": (u"Entrez une longitude valide."),
|
||||
"invalid_latitude": ("Entrez une latitude valide."),
|
||||
"invalid_longitude": ("Entrez une longitude valide."),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue