Исправлена ошибка фотографии профиля
This commit is contained in:
parent
5cf1bf9fde
commit
a4ded16d12
BIN
db/moona_data.db
BIN
db/moona_data.db
Binary file not shown.
2
main.py
2
main.py
@ -181,6 +181,7 @@ def edit_profile(logins):
|
|||||||
photo = None
|
photo = None
|
||||||
if form.del_photo.data:
|
if form.del_photo.data:
|
||||||
help_arg = photo
|
help_arg = photo
|
||||||
|
ph_f = False
|
||||||
photo = '../static/img/None_logo.png'
|
photo = '../static/img/None_logo.png'
|
||||||
if form.submit2.data:
|
if form.submit2.data:
|
||||||
user = session.query(User).filter(User.login == logins).first()
|
user = session.query(User).filter(User.login == logins).first()
|
||||||
@ -198,6 +199,7 @@ def edit_profile(logins):
|
|||||||
if help_arg:
|
if help_arg:
|
||||||
os.remove(help_arg)
|
os.remove(help_arg)
|
||||||
help_arg = False
|
help_arg = False
|
||||||
|
photo = '../static/img/None_logo.png'
|
||||||
user.photo = photo
|
user.photo = photo
|
||||||
session.commit()
|
session.commit()
|
||||||
if user.email == form.email.data:
|
if user.email == form.email.data:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB |
@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% if ph_f %}
|
{% if ph_f == 1 %}
|
||||||
{{ form.del_photo(type="submit", class="btn btn-primary") }}
|
{{ form.del_photo(type="submit", class="btn btn-primary") }}
|
||||||
{% for error in form.del_photo.errors %}
|
{% for error in form.del_photo.errors %}
|
||||||
<div class="alert alert-danger" role="alert">
|
<div class="alert alert-danger" role="alert">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user