mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
Do not import the whole werkzeug pkg (#271)
This commit is contained in:
parent
6ccf86919e
commit
efd2b66ac6
1 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ from flask_mail import Message
|
||||||
from flask_babel import get_locale, gettext as _
|
from flask_babel import get_locale, gettext as _
|
||||||
from werkzeug.security import check_password_hash
|
from werkzeug.security import check_password_hash
|
||||||
from smtplib import SMTPRecipientsRefused
|
from smtplib import SMTPRecipientsRefused
|
||||||
import werkzeug
|
from werkzeug.exceptions import NotFound
|
||||||
from sqlalchemy import orm
|
from sqlalchemy import orm
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ def remove_member(member_id):
|
||||||
def edit_member(member_id):
|
def edit_member(member_id):
|
||||||
member = Person.query.get(member_id, g.project)
|
member = Person.query.get(member_id, g.project)
|
||||||
if not member:
|
if not member:
|
||||||
raise werkzeug.exceptions.NotFound()
|
raise NotFound()
|
||||||
form = MemberForm(g.project, edit=True)
|
form = MemberForm(g.project, edit=True)
|
||||||
|
|
||||||
if request.method == 'POST' and form.validate():
|
if request.method == 'POST' and form.validate():
|
||||||
|
@ -491,7 +491,7 @@ def delete_bill(bill_id):
|
||||||
# fixme: everyone is able to delete a bill
|
# fixme: everyone is able to delete a bill
|
||||||
bill = Bill.query.get(g.project, bill_id)
|
bill = Bill.query.get(g.project, bill_id)
|
||||||
if not bill:
|
if not bill:
|
||||||
raise werkzeug.exceptions.NotFound()
|
raise NotFound()
|
||||||
|
|
||||||
db.session.delete(bill)
|
db.session.delete(bill)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
@ -505,7 +505,7 @@ def edit_bill(bill_id):
|
||||||
# FIXME: Test this bill belongs to this project !
|
# FIXME: Test this bill belongs to this project !
|
||||||
bill = Bill.query.get(g.project, bill_id)
|
bill = Bill.query.get(g.project, bill_id)
|
||||||
if not bill:
|
if not bill:
|
||||||
raise werkzeug.exceptions.NotFound()
|
raise NotFound()
|
||||||
|
|
||||||
form = get_billform_for(g.project, set_default=False)
|
form = get_billform_for(g.project, set_default=False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue