This commit is contained in:
Martin Quarda 2024-10-18 16:25:56 +02:00
parent 7c7f554fd0
commit abdb62fd55
2 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,7 @@ class RacerAdmin(admin.ModelAdmin):
@admin.register(Product) @admin.register(Product)
class ProductAdmin(admin.ModelAdmin): class ProductAdmin(admin.ModelAdmin):
list_display = ("name", "description", "price", "quantity") list_display = ("name", "description", "price", "hidden", "quantity")
@admin.register(Invoice) @admin.register(Invoice)

View File

@ -118,8 +118,10 @@ ALKÁTOR TEAM
email: info@alkator.cz email: info@alkator.cz
tel: + 420 728 018 088 tel: + 420 728 018 088
web: https://alkator.cz""", "info@alkator.cz", [email]) web: https://alkator.cz""", "info@alkator.cz", [email])
mail.send() if mail.send():
return HttpResponse('{"success":"Úspěšně poslán kód pro obnovení hesla uživatele '+ user.email + '", "redirect":"/#forgotten_password"}', content_type='application/json') return HttpResponse('{"success":"Úspěšně poslán kód pro obnovení hesla uživatele '+ user.email + '", "redirect":"/#forgotten_password"}', content_type='application/json')
else:
return HttpResponse('{"reason":"Nepovedlo se odelat email"}', status=400, content_type='application/json')
else: else:
try: try:
user = authenticate(request, username=request.POST['email'], password=request.POST['password']) user = authenticate(request, username=request.POST['email'], password=request.POST['password'])