mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Clean up some useless prints
This commit is contained in:
parent
dbf0653baf
commit
7797f87dd0
@ -59,7 +59,6 @@ class ProductsLookup(LookupChannel):
|
|||||||
model = Product
|
model = Product
|
||||||
|
|
||||||
def get_query(self, q, request):
|
def get_query(self, q, request):
|
||||||
print(request.__dict__)
|
|
||||||
return (self.model.objects.filter(name__icontains=q) | self.model.objects.filter(code__icontains=q))[:50]
|
return (self.model.objects.filter(name__icontains=q) | self.model.objects.filter(code__icontains=q))[:50]
|
||||||
|
|
||||||
def format_item_display(self, item):
|
def format_item_display(self, item):
|
||||||
|
@ -57,7 +57,6 @@ class AddFilesForm(forms.Form):
|
|||||||
try:
|
try:
|
||||||
new_file.clean()
|
new_file.clean()
|
||||||
new_file.save()
|
new_file.save()
|
||||||
print(f.__dict__)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.add_error(None, _("Error uploading file %(file_name)s: %(msg)s") %
|
self.add_error(None, _("Error uploading file %(file_name)s: %(msg)s") %
|
||||||
{'file_name': f, 'msg': str(e.message)})
|
{'file_name': f, 'msg': str(e.message)})
|
||||||
|
@ -59,8 +59,8 @@ class EbouticMain(TemplateView):
|
|||||||
if request.user.is_in_group(g.name):
|
if request.user.is_in_group(g.name):
|
||||||
self.basket.add_product(p)
|
self.basket.add_product(p)
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except:
|
||||||
print(repr(e))
|
pass
|
||||||
|
|
||||||
def del_product(self, request):
|
def del_product(self, request):
|
||||||
""" Delete a product from the basket """
|
""" Delete a product from the basket """
|
||||||
|
@ -42,7 +42,6 @@ class SubscriptionForm(forms.ModelForm):
|
|||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
cleaned_data = super(SubscriptionForm, self).clean()
|
cleaned_data = super(SubscriptionForm, self).clean()
|
||||||
print(cleaned_data)
|
|
||||||
if (cleaned_data.get("member") is None
|
if (cleaned_data.get("member") is None
|
||||||
and "last_name" not in self.errors.as_data()
|
and "last_name" not in self.errors.as_data()
|
||||||
and "first_name" not in self.errors.as_data()
|
and "first_name" not in self.errors.as_data()
|
||||||
|
Loading…
Reference in New Issue
Block a user