Merge branch 'qwann/models/lang_clean' into 'master'
Qwann/models/lang clean See merge request !10
This commit is contained in:
commit
5759cd47bb
10 changed files with 33 additions and 29 deletions
|
@ -47,7 +47,7 @@ class EquipmentAttribution(models.Model):
|
||||||
equipment = models.ForeignKey(AbstractEquipment)
|
equipment = models.ForeignKey(AbstractEquipment)
|
||||||
activity = models.ForeignKey(Activity)
|
activity = models.ForeignKey(Activity)
|
||||||
amount = models.PositiveSmallIntegerField(_("Quantité attribuée"))
|
amount = models.PositiveSmallIntegerField(_("Quantité attribuée"))
|
||||||
remarks = models.TextField("Remarques concernant l'attribution")
|
remarks = models.TextField(_("Remarques concernant l'attribution"))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("attribution de matériel")
|
verbose_name = _("attribution de matériel")
|
||||||
|
@ -60,7 +60,7 @@ class EquipmentAttribution(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class EquipmentRemark(models.Model):
|
class EquipmentRemark(models.Model):
|
||||||
remark = models.TextField("Remarque sur le matériel")
|
remark = models.TextField(_("Remarque sur le matériel"))
|
||||||
equipment = models.ForeignKey(
|
equipment = models.ForeignKey(
|
||||||
AbstractEquipment,
|
AbstractEquipment,
|
||||||
related_name="remarks",
|
related_name="remarks",
|
||||||
|
|
|
@ -66,14 +66,14 @@ class ActivityTag(models.Model):
|
||||||
)
|
)
|
||||||
color_regex = RegexValidator(
|
color_regex = RegexValidator(
|
||||||
regex=r'^#(?:[0-9a-fA-F]{3}){1,2}$',
|
regex=r'^#(?:[0-9a-fA-F]{3}){1,2}$',
|
||||||
message="La chaîne de caractère rentrée n'est pas"
|
message=_("La chaîne de caractère rentrée n'est pas"
|
||||||
"une couleur en hexadécimal.",
|
" une couleur en hexadécimal."),
|
||||||
)
|
)
|
||||||
color = models.CharField(
|
color = models.CharField(
|
||||||
_('Couleur'),
|
_('Couleur'),
|
||||||
max_length=7,
|
max_length=7,
|
||||||
validators=[color_regex],
|
validators=[color_regex],
|
||||||
help_text="Rentrer une couleur en hexadécimal",
|
help_text=_("Rentrer une couleur en hexadécimal"),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Django==1.10.*
|
Django==1.11.*
|
||||||
Pillow==3.3.0
|
Pillow==3.3.0
|
||||||
psycopg2==2.6.2
|
psycopg2==2.6.2
|
||||||
django-bootstrap-form==3.2.1
|
django-bootstrap-form==3.2.1
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{% extends "base_html.html" %}
|
{% extends "base_html.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}GestionÉvènementiel{% block sub_title %}{% endblock %}{% endblock %}
|
{% block title %}GestionÉvènementiel{% block sub_title %}{% endblock %}{% endblock %}
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<h5 class="centered username">{{ user.username }}</h5>
|
<h5 class="centered username">{{ user.username }}</h5>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h5 class="centered username">non connecté·e</h5>
|
<h5 class="centered username">{% trans "non connecté·e" %}</h5>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
@ -22,19 +23,19 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url "users:login" %}">
|
<a href="{% url "users:login" %}">
|
||||||
<i class="fa fa-sign-in"></i>
|
<i class="fa fa-sign-in"></i>
|
||||||
<span>Se connecter</span>
|
<span>{% trans "Se connecter" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url "users:create_user" %}">
|
<a href="{% url "users:create_user" %}">
|
||||||
<i class="fa fa-user"></i>
|
<i class="fa fa-user"></i>
|
||||||
<span>Créer un compte</span>
|
<span>{% trans "Créer un compte" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url "users:password_reset" %}">
|
<a href="{% url "users:password_reset" %}">
|
||||||
<i class="fa fa-question"></i>
|
<i class="fa fa-question"></i>
|
||||||
<span>Mot de passe oublié</span>
|
<span>{% trans "Mot de passe oublié" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -42,13 +43,13 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url "users:password_change" %}">
|
<a href="{% url "users:password_change" %}">
|
||||||
<i class="fa fa-unlock-alt"></i>
|
<i class="fa fa-unlock-alt"></i>
|
||||||
<span>Changer de mot de passe</span>
|
<span>{% trans "Changer de mot de passe" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url "users:logout"%}">
|
<a href="{% url "users:logout"%}">
|
||||||
<i class="fa fa-sign-out"></i>
|
<i class="fa fa-sign-out"></i>
|
||||||
<span>Se déconnecter</span>
|
<span>{% trans "Se déconnecter" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -66,4 +67,3 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block page_title %}Erreur !{% endblock %}
|
{% block page_title %}{% trans "Erreur !" %}{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
|
{% load i18n %}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
{% blocktrans %}
|
||||||
en cas de problème : <tt>cof-geek@ens.fr</tt>.
|
en cas de problème : <tt>cof-geek@ens.fr</tt>.
|
||||||
|
{% endblocktrans %}
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% load i18n %}
|
||||||
<ul class="nav navbar-top-links pull-right">
|
<ul class="nav navbar-top-links pull-right">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
|
@ -67,12 +68,12 @@
|
||||||
<i class="fa fa-user fa-fw fa-lg"></i> <i class="fa fa-caret-down"></i>
|
<i class="fa fa-user fa-fw fa-lg"></i> <i class="fa fa-caret-down"></i>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-user">
|
<ul class="dropdown-menu dropdown-user">
|
||||||
<li><a href="#"><i class="fa fa-user fa-fw"></i>Mon profile</a>
|
<li><a href="#"><i class="fa fa-user fa-fw"></i>{% trans "Mon profil" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{% url "users:password_change" %}"><i class="fa fa-unlock-alt fa-fw"></i>Changer de mot de passe</a>
|
<li><a href="{% url "users:password_change" %}"><i class="fa fa-unlock-alt fa-fw"></i>{% trans "Changer de mot de passe" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href="{% url "users:logout" %}"><i class="fa fa-sign-out fa-fw"></i>Se déconnecter</a>
|
<li><a href="{% url "users:logout" %}"><i class="fa fa-sign-out fa-fw"></i>{% trans "Se déconnecter" %}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- /.dropdown-user -->
|
<!-- /.dropdown-user -->
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block page_title %}Acceuil{% endblock %}
|
{% block page_title %}{% trans "Accueil" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Bonjours, je suis une maison</h2>
|
<h2>Bonjours, je suis une maison</h2>
|
||||||
|
|
|
@ -3,5 +3,5 @@ from .views import Home
|
||||||
|
|
||||||
app_name = 'shared'
|
app_name = 'shared'
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'$', Home.as_view(), name='home'),
|
url(r'^$', Home.as_view(), name='home'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
from django.contrib.auth import views as auth_views
|
from django.contrib.auth import views as auth_views
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.core.urlresolvers import reverse_lazy
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from shared.views import Home
|
from shared.views import Home
|
||||||
from users.views import CreateUser
|
from users.views import CreateUser
|
||||||
|
|
||||||
|
@ -13,8 +14,8 @@ urlpatterns = [
|
||||||
auth_views.login,
|
auth_views.login,
|
||||||
{'template_name': 'users/login.html',
|
{'template_name': 'users/login.html',
|
||||||
'extra_context': {
|
'extra_context': {
|
||||||
'page_title': 'Connexion',
|
'page_title': _('Connexion'),
|
||||||
'button': 'Se connecter',
|
'button': _('Se connecter'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
name='login',
|
name='login',
|
||||||
|
@ -29,8 +30,8 @@ urlpatterns = [
|
||||||
{'template_name': 'users/change_pass.html',
|
{'template_name': 'users/change_pass.html',
|
||||||
'post_change_redirect': reverse_lazy('shared:home'),
|
'post_change_redirect': reverse_lazy('shared:home'),
|
||||||
'extra_context': {
|
'extra_context': {
|
||||||
'page_title': 'Changement de mot de passe',
|
'page_title': _('Changement de mot de passe'),
|
||||||
'button': 'Modifier',
|
'button': _('Modifier'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
name='password_change'),
|
name='password_change'),
|
||||||
|
@ -43,8 +44,8 @@ urlpatterns = [
|
||||||
'subject_template_name': 'subject_password_reset.txt',
|
'subject_template_name': 'subject_password_reset.txt',
|
||||||
'post_reset_redirect': reverse_lazy('users:password_reset_done'),
|
'post_reset_redirect': reverse_lazy('users:password_reset_done'),
|
||||||
'extra_context': {
|
'extra_context': {
|
||||||
'page_title': 'Demander un nouveau mot de passe',
|
'page_title': _('Demander un nouveau mot de passe'),
|
||||||
'button': 'Envoyer'
|
'button': _('Envoyer')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
name='password_reset'),
|
name='password_reset'),
|
||||||
|
@ -62,8 +63,8 @@ urlpatterns = [
|
||||||
'user:password_reset_complete'
|
'user:password_reset_complete'
|
||||||
),
|
),
|
||||||
'extra_context': {
|
'extra_context': {
|
||||||
'page_title': 'Changer de mot de passe',
|
'page_title': _('Changer de mot de passe'),
|
||||||
'button': 'Changer'
|
'button': _('Changer')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
name='password_reset_confirm'),
|
name='password_reset_confirm'),
|
||||||
|
|
Loading…
Reference in a new issue