push
This commit is contained in:
parent
d5ca4e0acc
commit
f792c1c8cf
Binary file not shown.
@ -64,9 +64,15 @@ def Notificationuser_deletenot(request, not_id):
|
||||
def Notificationuser_deleteuser(request, user_id):
|
||||
if request.user.is_authenticated and request.user.is_superuser == True:
|
||||
User = get_user_model()
|
||||
instance = User.objects.get(id=user_id)
|
||||
instance.is_active = False
|
||||
instance.save()
|
||||
instant = User.objects.get(id=user_id)
|
||||
instant.is_active = False
|
||||
instant.email = str(instant.id)
|
||||
instant.username = str(instant.id)
|
||||
instant_offer = Product.objects.filter(user_iden = instant)
|
||||
for offer in instant_offer:
|
||||
offer.active = False
|
||||
offer.save()
|
||||
instant.save()
|
||||
messages.success(request, 'Użytkownik Usunięty')
|
||||
return redirect(UserPage)
|
||||
else:
|
||||
|
@ -42,7 +42,7 @@
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 justify-content-center align-items-center">
|
||||
<div class="col-10 col-md-8 col-lg-6">
|
||||
<input type="submit" class="btn btn-primary update_btn" value="Dodaj Komentarz">
|
||||
<input type="submit" class="btn btn-primary update_btn" value="Zgłoś">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,7 +41,7 @@
|
||||
<div class="container h-100">
|
||||
<div class="row h-100 justify-content-center align-items-center">
|
||||
<div class="col-10 col-md-8 col-lg-6">
|
||||
<input type="submit" class="btn btn-primary update_btn" value="Dodaj Komentarz">
|
||||
<input type="submit" class="btn btn-primary update_btn" value="Zgłoś">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user