# HG changeset patch # User Daniele Nicolodi # Date 1318583131 -7200 # Node ID a4a1b9f582cdc2550e8cfcb1240c7a917d58b65a # Parent d034b1541bf1bbc32647cb8c98e8daf2a6ddf51b Armonize flashed mesages. diff -r d034b1541bf1 -r a4a1b9f582cd src/ltpdarepo/tests/manage-databases.txt --- a/src/ltpdarepo/tests/manage-databases.txt Fri Oct 14 11:05:31 2011 +0200 +++ b/src/ltpdarepo/tests/manage-databases.txt Fri Oct 14 11:05:31 2011 +0200 @@ -33,7 +33,7 @@ >>> browser.url 'http://localhost/manage/databases/' >>> browser.contents - '...
Database "database1" created.
...' + '...
Database created.
...' View database:: @@ -52,7 +52,7 @@ >>> browser.url 'http://localhost/manage/databases/database1' >>> browser.contents - '...
Database "database1" modified.
...' + '...
Database modified.
...' >>> browser.contents '...

Description: Test Database One

...' @@ -156,7 +156,7 @@ >>> browser.url 'http://localhost/manage/databases/' >>> browser.contents - '...
Database "database1" deleted.
...' + '...
Database deleted.
...' # Local Variables: diff -r d034b1541bf1 -r a4a1b9f582cd src/ltpdarepo/views/databases.py --- a/src/ltpdarepo/views/databases.py Fri Oct 14 11:05:31 2011 +0200 +++ b/src/ltpdarepo/views/databases.py Fri Oct 14 11:05:31 2011 +0200 @@ -41,7 +41,7 @@ db = Database() form.update(db) db.create() - flash(u'Database "%s" created.' % db.id) + flash(u'Database created.') return redirect(url_for('manage.databases.index')) return render_template('databases/create.html', form=form) @@ -57,7 +57,7 @@ if request.method == 'POST' and form.validate(): form.update(db) db.save() - flash('Database "%s" modified.' % db.id) + flash('Database modified.') return redirect(url_for('manage.databases.view', database=database)) return render_template('databases/edit.html', database=db, form=form) @@ -74,9 +74,9 @@ if request.method == 'POST' and form.validate(): if request.form.get('ok'): db.drop() - flash('Database "%s" deleted.' % db.id) + flash('Database deleted.') return redirect(url_for('manage.databases.index')) - flash("Operation cancelled.") + flash('Operation cancelled.') return redirect(url_for('manage.databases.view', database=database)) return render_template('databases/drop.html', database=db, form=form) diff -r d034b1541bf1 -r a4a1b9f582cd src/ltpdarepo/views/users.py --- a/src/ltpdarepo/views/users.py Fri Oct 14 11:05:31 2011 +0200 +++ b/src/ltpdarepo/views/users.py Fri Oct 14 11:05:31 2011 +0200 @@ -196,7 +196,8 @@ if request.method == 'POST' and form.validate(): if request.form.get('ok'): user.delete() - flash('User "%s" deleted.' % username) + flash('User deleted.') + flash('Operation cancelled.') return redirect(url_for('manage.users.index')) return render_template('users/drop.html', form=form, user=user)