From c7db0c10b670e56291747c2189d0c667402fdf71 Mon Sep 17 00:00:00 2001 From: Qwann Date: Tue, 21 Feb 2017 17:17:09 +0100 Subject: [PATCH 1/2] include forgotten --- evenementiel/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evenementiel/urls.py b/evenementiel/urls.py index a33af57..4ab8385 100644 --- a/evenementiel/urls.py +++ b/evenementiel/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ From 8055be4c200f686f17270dd21f92e653bb48e4a6 Mon Sep 17 00:00:00 2001 From: Qwann Date: Tue, 21 Feb 2017 17:25:46 +0100 Subject: [PATCH 2/2] fixes --- event/models.py | 4 +--- event/tests.py | 8 ++++---- user/forms.py | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/event/models.py b/event/models.py index 9605070..7723796 100644 --- a/event/models.py +++ b/event/models.py @@ -158,9 +158,7 @@ class Activity(ActivityTemplate): def get_herited(self, attrname): attr = super(Activity, self).__getattribute__(attrname) - if (attrname == 'parent' - or attrname == 'staff' - or attrname == 'equipment'): + if attrname in {"parent", "staff", "equipment"}: raise FieldError( _("%(attrname)s n'est pas un champ héritable"), params={'attrname': attrname}, diff --git a/event/tests.py b/event/tests.py index e634b82..dbf0cf2 100644 --- a/event/tests.py +++ b/event/tests.py @@ -92,24 +92,24 @@ class ActivityInheritanceTest(TestCase): self.template_act.place.add(self.loge) self.assertEqual( self.real_act.get_herited('place').get().name, - "Loge 45" + self.loge ) self.real_act.place.add(self.aqua) self.assertEqual( self.real_act.get_herited('place').get().name, - "Aquarium" + self.aqua ) def test_inherites_tags(self): self.template_act.tags.add(self.tag_foo) self.assertEqual( self.real_act.get_herited('tags').get().name, - "foo" + self.tag_foo ) self.real_act.tags.add(self.tag_bar) self.assertEqual( self.real_act.get_herited('tags').get().name, - "bar" + self.tag_bar ) diff --git a/user/forms.py b/user/forms.py index bdc86ea..7ba4fc3 100644 --- a/user/forms.py +++ b/user/forms.py @@ -6,12 +6,12 @@ from django.conf import settings class CreateUserForm(UserCreationForm): key = forms.CharField( - label="Clée de sécurité", + label="Clef de sécurité", widget=forms.PasswordInput, - help_text="Cette clée est fournie par l'administrat-rice-eur " + help_text="Cette clef est fournie par l'administrat·rice·eur " "du site. Pour en obtenir une veuillez la-le contacter." ) - error_m = {'wrong_key': "La clef fournie est eronnée."} + error_m = {'wrong_key': "La clef fournie est erronée."} class Meta: model = User