mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 03:13:12 +00:00
contains devient icontains
This commit is contained in:
parent
9364838c34
commit
ec980634ed
4 changed files with 13 additions and 11 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
## v3.3.1
|
||||||
|
* contains devient icontains pour enlever la sensibilité à la casse
|
||||||
## v3.3.0
|
## v3.3.0
|
||||||
* Ajout d'icônes
|
* Ajout d'icônes
|
||||||
* Le . est utilisé pour les décimaux
|
* Le . est utilisé pour les décimaux
|
||||||
|
|
|
@ -532,7 +532,7 @@ class ProductsAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = Product.objects.all()
|
qs = Product.objects.all()
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
class ActiveProductsAutocomplete(autocomplete.Select2QuerySetView):
|
class ActiveProductsAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
|
@ -542,7 +542,7 @@ class ActiveProductsAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = Product.objects.filter(is_active=True)
|
qs = Product.objects.filter(is_active=True)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
########## Kegs ##########
|
########## Kegs ##########
|
||||||
|
@ -790,7 +790,7 @@ class KegActiveAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = Keg.objects.filter(is_active = True)
|
qs = Keg.objects.filter(is_active = True)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
class KegPositiveAutocomplete(autocomplete.Select2QuerySetView):
|
class KegPositiveAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
|
@ -800,7 +800,7 @@ class KegPositiveAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = Keg.objects.filter(stockHold__gt = 0)
|
qs = Keg.objects.filter(stockHold__gt = 0)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
########## Menus ##########
|
########## Menus ##########
|
||||||
|
@ -957,7 +957,7 @@ class MenusAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = Menu.objects.all()
|
qs = Menu.objects.all()
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
########## Ranking ##########
|
########## Ranking ##########
|
||||||
|
|
|
@ -39,6 +39,6 @@
|
||||||
<li><a href="https://www.facebook.com/coopesmetz/" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
|
<li><a href="https://www.facebook.com/coopesmetz/" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<p class="copyright">coope.rez v3.3.0 (release stable) © 2018 Yoann Pietri.</p>
|
<p class="copyright">coope.rez v3.3.1 (release stable) © 2018 Yoann Pietri.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1079,7 +1079,7 @@ class AllUsersAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = User.objects.all()
|
qs = User.objects.all()
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(Q(username__contains=self.q) | Q(first_name__contains=self.q) | Q(last_name__contains=self.q))
|
qs = qs.filter(Q(username__icontains=self.q) | Q(first_name__icontains=self.q) | Q(last_name__icontains=self.q))
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
class ActiveUsersAutocomplete(autocomplete.Select2QuerySetView):
|
class ActiveUsersAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
|
@ -1089,7 +1089,7 @@ class ActiveUsersAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = User.objects.filter(is_active=True)
|
qs = User.objects.filter(is_active=True)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(Q(username__contains=self.q) | Q(first_name__contains=self.q) | Q(last_name__contains=self.q))
|
qs = qs.filter(Q(username__icontains=self.q) | Q(first_name__icontains=self.q) | Q(last_name__icontains=self.q))
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
class AdherentAutocomplete(autocomplete.Select2QuerySetView):
|
class AdherentAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
|
@ -1101,7 +1101,7 @@ class AdherentAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
pks = [x.pk for x in qs if x.is_adherent]
|
pks = [x.pk for x in qs if x.is_adherent]
|
||||||
qs = User.objects.filter(pk__in=pks)
|
qs = User.objects.filter(pk__in=pks)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(Q(username__contains=self.q) | Q(first_name__contains=self.q) | Q(last_name__contains=self.q))
|
qs = qs.filter(Q(username__icontains=self.q) | Q(first_name__icontains=self.q) | Q(last_name__icontains=self.q))
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
|
|
||||||
|
@ -1112,7 +1112,7 @@ class NonSuperUserAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = User.objects.filter(is_superuser=False)
|
qs = User.objects.filter(is_superuser=False)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(Q(username__contains=self.q) | Q(first_name__contains=self.q) | Q(last_name__contains=self.q))
|
qs = qs.filter(Q(username__icontains=self.q) | Q(first_name__icontains=self.q) | Q(last_name__icontains=self.q))
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
class NonAdminUserAutocomplete(autocomplete.Select2QuerySetView):
|
class NonAdminUserAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
|
@ -1122,5 +1122,5 @@ class NonAdminUserAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = User.objects.filter(is_staff=False)
|
qs = User.objects.filter(is_staff=False)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(Q(username__contains=self.q) | Q(first_name__contains=self.q) | Q(last_name__contains=self.q))
|
qs = qs.filter(Q(username__icontains=self.q) | Q(first_name__icontains=self.q) | Q(last_name__icontains=self.q))
|
||||||
return qs
|
return qs
|
Loading…
Reference in a new issue