diff --git a/gestioncof/admin.py b/gestioncof/admin.py index 86935f64..342317f3 100644 --- a/gestioncof/admin.py +++ b/gestioncof/admin.py @@ -5,13 +5,16 @@ from __future__ import print_function from __future__ import unicode_literals from django.contrib import admin -from gestioncof.models import * -from gestioncof.petits_cours_models import * +from gestioncof.models import SurveyQuestionAnswer, SurveyQuestion, \ + CofProfile, EventOption, EventOptionChoice, Event, Club, CustomMail, \ + Survey, EventCommentField, EventRegistration +from gestioncof.petits_cours_models import PetitCoursDemande, \ + PetitCoursSubject, PetitCoursAbility, PetitCoursAttribution, \ + PetitCoursAttributionCounter from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ import django.utils.six as six import autocomplete_light @@ -187,7 +190,8 @@ else: class EventRegistrationAdmin(admin.ModelAdmin): form = autocomplete_light.modelform_factory(EventRegistration, exclude=[]) - list_display = ('__unicode__' if six.PY2 else '__str__', 'event', 'user', 'paid') + list_display = ('__unicode__' if six.PY2 else '__str__', 'event', 'user', + 'paid') list_filter = ('paid',) search_fields = ('user__username', 'user__first_name', 'user__last_name', 'user__email', 'event__title') diff --git a/gestioncof/models.py b/gestioncof/models.py index cf3742f1..7df0fb00 100644 --- a/gestioncof/models.py +++ b/gestioncof/models.py @@ -11,7 +11,7 @@ from django.utils.encoding import python_2_unicode_compatible import django.utils.six as six from django.db.models.signals import post_save -from gestioncof.petits_cours_models import * +from gestioncof.petits_cours_models import choices_length OCCUPATION_CHOICES = ( ('exterieur', _("Extérieur")), diff --git a/gestioncof/petits_cours_models.py b/gestioncof/petits_cours_models.py index e9c2943d..4428b78c 100644 --- a/gestioncof/petits_cours_models.py +++ b/gestioncof/petits_cours_models.py @@ -53,7 +53,7 @@ class PetitCoursAbility(models.Model): def __str__(self): return "%s - %s - %s" % (self.user.username, - self.matiere, self.niveau) + self.matiere, self.niveau) @python_2_unicode_compatible diff --git a/gestioncof/petits_cours_views.py b/gestioncof/petits_cours_views.py index b0f64d37..7d54766e 100644 --- a/gestioncof/petits_cours_views.py +++ b/gestioncof/petits_cours_views.py @@ -20,7 +20,9 @@ from django.contrib.auth.decorators import login_required from django.db.models import Min from gestioncof.models import CofProfile -from gestioncof.petits_cours_models import * +from gestioncof.petits_cours_models import PetitCoursDemande, \ + PetitCoursAttribution, PetitCoursAttributionCounter, PetitCoursAbility, \ + PetitCoursSubject from gestioncof.decorators import buro_required from gestioncof.shared import lock_table, unlock_tables @@ -359,7 +361,7 @@ def inscription(request): abilities = PetitCoursAbility.objects \ .filter(user=request.user).all() for ability in abilities: - counter = _get_attrib_counter(ability.user, ability.matiere) + _get_attrib_counter(ability.user, ability.matiere) unlock_tables() success = True formset = MatieresFormSet(instance=request.user) diff --git a/gestioncof/templates/login.html b/gestioncof/templates/login.html index 7e6a6e66..89b68380 100644 --- a/gestioncof/templates/login.html +++ b/gestioncof/templates/login.html @@ -10,7 +10,8 @@
Identifiants incorrects.
{% endif %} -