create/update/delete of condition, covertype, genre, owned, rating objects all works, and can be accessed from Admin menu

This commit is contained in:
2020-12-05 11:45:47 +11:00
parent 989c1693f7
commit c367a2559f
6 changed files with 182 additions and 113 deletions

View File

@@ -1,14 +1,16 @@
from wtforms import SubmitField, StringField, HiddenField, SelectField, validators from wtforms import SubmitField, StringField, HiddenField, SelectField, validators
from flask import request, render_template from flask import request, render_template, redirect
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from __main__ import db, app, ma from __main__ import db, app, ma
from sqlalchemy import func, Sequence
from status import st, Status
################################################################################ ################################################################################
# Class describing Condition in the database, and via sqlalchemy, connected to the DB as well # Class describing Condition in the database, and via sqlalchemy, connected to the DB as well
################################################################################ ################################################################################
class Condition(db.Model): class Condition(db.Model):
id = db.Column(db.Integer, unique=True, nullable=False, primary_key=True) id = db.Column(db.Integer, db.Sequence('condition_id_seq'), primary_key=True )
name = db.Column(db.String(50), unique=False, nullable=False) name = db.Column(db.String(50), unique=True, nullable=False)
def __repr__(self): def __repr__(self):
return "<id: {}, name: {}>".format(self.id,self.name) return "<id: {}, name: {}>".format(self.id,self.name)
@@ -19,7 +21,6 @@ class Condition(db.Model):
class ConditionSchema(ma.SQLAlchemyAutoSchema): class ConditionSchema(ma.SQLAlchemyAutoSchema):
class Meta: model = Condition class Meta: model = Condition
################################################################################ ################################################################################
# Helper class that defines a form for condition, used to make html <form>, with field validation (via wtforms) # Helper class that defines a form for condition, used to make html <form>, with field validation (via wtforms)
################################################################################ ################################################################################
@@ -36,36 +37,49 @@ class ConditionForm(FlaskForm):
################################################################################ ################################################################################
@app.route("/conditions", methods=["GET"]) @app.route("/conditions", methods=["GET"])
def conditions(): def conditions():
conditions = Condition.query.order_by('id').all() objects = Condition.query.order_by('id').all()
return render_template("show_id_name.html", objects=conditions, page_title='Show All Conditions', url_base='condition') return render_template("show_id_name.html", objects=objects, page_title='Show All Conditions', url_base='condition', alert=st.GetAlert(), message=st.GetMessage() )
################################################################################ ################################################################################
# /condition/<id> -> GET/POST(save or delete) -> shows/edits/delets a single # /condition -> GET/POST -> creates a new condition type and when created, takes you back to /conditions
# condition ################################################################################
@app.route("/condition", methods=["GET", "POST"])
def new_condition():
form = ConditionForm(request.form)
if 'name' not in request.form:
return render_template("edit_id_name.html", form=form, page_title='Create new Condition' )
else:
condition = Condition( name=request.form["name"] )
db.session.add(condition)
db.session.commit()
st.SetMessage( "Created new Condition (id={})".format(condition.id) )
conditions = Condition.query.order_by('id').all()
return redirect( '/conditions' )
################################################################################
# /condition/<id> -> GET/POST(save or delete) -> shows/edits/delets a single condition
################################################################################ ################################################################################
@app.route("/condition/<id>", methods=["GET", "POST"]) @app.route("/condition/<id>", methods=["GET", "POST"])
def condition(id): def condition(id):
### DDP: should this be request.form or request.values? ### DDP: should this be request.form or request.values?
alert="Success" form = ConditionForm(request.form)
condition_form = ConditionForm(request.form) if request.method == 'POST' and form.validate():
if request.method == 'POST' and condition_form.validate():
id = request.form['id']
condition = Condition.query.get(id) condition = Condition.query.get(id)
try: if 'delete' in request.form:
request.form['submit'] st.SetMessage("Successfully deleted (id={}, name={})".format( condition.id, condition.name ) )
except: condition = Condition.query.filter(Condition.id==id).delete()
message="Sorry, Deleting unsupported at present" if 'submit' in request.form:
alert="Danger" st.SetMessage("Successfully Updated Condition (id={})".format(id) )
else:
condition.name = request.form['name'] condition.name = request.form['name']
db.session.commit() db.session.commit()
message="Successfully Updated Condition (id={})".format(id) return redirect( '/conditions' )
else: else:
condition = Condition.query.get(id) condition = Condition.query.get(id)
condition_form = ConditionForm(request.values, obj=condition) form = ConditionForm(request.values, obj=condition)
message="" return render_template("edit_id_name.html", form=form, page_title='Edit Condition' )
return render_template("edit_id_name.html", condition=condition, alert=alert, message=message, form=condition_form, page_title='Edit Condition')
################################################################################
# Gets the Condition matching id from DB, helper func in jinja2 code to show books
################################################################################
def GetConditionById(id): def GetConditionById(id):
return Condition.query.get(id).name return Condition.query.get(id).name

View File

@@ -1,14 +1,16 @@
from wtforms import SubmitField, StringField, HiddenField, SelectField, validators from wtforms import SubmitField, StringField, HiddenField, SelectField, validators
from flask import request, render_template from flask import request, render_template, redirect
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from __main__ import db, app, ma from __main__ import db, app, ma
from sqlalchemy import func, Sequence
from status import st, Status
################################################################################ ################################################################################
# Class describing Covertype in the database, and via sqlalchemy, connected to the DB as well # Class describing Covertype in the database, and via sqlalchemy, connected to the DB as well
################################################################################ ################################################################################
class Covertype(db.Model): class Covertype(db.Model):
id = db.Column(db.Integer, unique=True, nullable=False, primary_key=True) id = db.Column(db.Integer, db.Sequence('covertype_id_seq'), primary_key=True )
name = db.Column(db.String(50), unique=False, nullable=False) name = db.Column(db.String(50), unique=True, nullable=False)
def __repr__(self): def __repr__(self):
return "<id: {}, name: {}>".format(self.id,self.name) return "<id: {}, name: {}>".format(self.id,self.name)
@@ -19,7 +21,6 @@ class Covertype(db.Model):
class CovertypeSchema(ma.SQLAlchemyAutoSchema): class CovertypeSchema(ma.SQLAlchemyAutoSchema):
class Meta: model = Covertype class Meta: model = Covertype
################################################################################ ################################################################################
# Helper class that defines a form for covertype, used to make html <form>, with field validation (via wtforms) # Helper class that defines a form for covertype, used to make html <form>, with field validation (via wtforms)
################################################################################ ################################################################################
@@ -36,35 +37,49 @@ class CovertypeForm(FlaskForm):
################################################################################ ################################################################################
@app.route("/covertypes", methods=["GET"]) @app.route("/covertypes", methods=["GET"])
def covertypes(): def covertypes():
covertypes = Covertype.query.order_by('id').all() objects = Covertype.query.order_by('id').all()
return render_template( "show_id_name.html", objects=covertypes, page_title='Show All Covertypes', url_base='covertype') return render_template("show_id_name.html", objects=objects, page_title='Show All Covertypes', url_base='covertype', alert=st.GetAlert(), message=st.GetMessage() )
################################################################################ ################################################################################
# /covertype/<id> -> GET/POST(save or delete) -> shows/edits/delets a single # /covertype -> GET/POST -> creates a new covertype type and when created, takes you back to /covertypes
# covertype ################################################################################
@app.route("/covertype", methods=["GET", "POST"])
def new_covertype():
form = CovertypeForm(request.form)
if 'name' not in request.form:
return render_template("edit_id_name.html", form=form, page_title='Create new Covertype' )
else:
covertype = Covertype( name=request.form["name"] )
db.session.add(covertype)
db.session.commit()
st.SetMessage( "Created new Covertype (id={})".format(covertype.id) )
covertypes = Covertype.query.order_by('id').all()
return redirect( '/covertypes' )
################################################################################
# /covertype/<id> -> GET/POST(save or delete) -> shows/edits/delets a single covertype
################################################################################ ################################################################################
@app.route("/covertype/<id>", methods=["GET", "POST"]) @app.route("/covertype/<id>", methods=["GET", "POST"])
def covertype(id): def covertype(id):
### DDP: should this be request.form or request.values? ### DDP: should this be request.form or request.values?
alert="Success" form = CovertypeForm(request.form)
covertype_form = CovertypeForm(request.form) if request.method == 'POST' and form.validate():
if request.method == 'POST' and covertype_form.validate():
id = request.form['id']
covertype = Covertype.query.get(id) covertype = Covertype.query.get(id)
try: if 'delete' in request.form:
request.form['submit'] st.SetMessage("Successfully deleted (id={}, name={})".format( covertype.id, covertype.name ) )
except: covertype = Covertype.query.filter(Covertype.id==id).delete()
message="Sorry, Deleting unsupported at present" if 'submit' in request.form:
alert="Danger" st.SetMessage("Successfully Updated Covertype (id={})".format(id) )
else:
covertype.name = request.form['name'] covertype.name = request.form['name']
db.session.commit() db.session.commit()
message="Successfully Updated Covertype (id={})".format(id) return redirect( '/covertypes' )
else: else:
covertype = Covertype.query.get(id) covertype = Covertype.query.get(id)
covertype_form = CovertypeForm(request.values, obj=covertype) form = CovertypeForm(request.values, obj=covertype)
message="" return render_template("edit_id_name.html", form=form, page_title='Edit Covertype' )
return render_template("edit_id_name.html", covertype=covertype, alert=alert, message=message, form=covertype_form, page_title='Edit Covertype')
################################################################################
# Gets the Covertype matching id from DB, helper func in jinja2 code to show books
################################################################################
def GetCovertypeById(id): def GetCovertypeById(id):
return Covertype.query.get(id).name return Covertype.query.get(id).name

View File

@@ -1,14 +1,16 @@
from wtforms import SubmitField, StringField, HiddenField, validators from wtforms import SubmitField, StringField, HiddenField, SelectField, validators
from flask import request, render_template from flask import request, render_template, redirect
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from __main__ import db, app, ma from __main__ import db, app, ma
from sqlalchemy import func, Sequence
from status import st, Status
################################################################################ ################################################################################
# Class describing Genre in the database, and via sqlalchemy, connected to the DB as well # Class describing Genre in the database, and via sqlalchemy, connected to the DB as well
################################################################################ ################################################################################
class Genre(db.Model): class Genre(db.Model):
id = db.Column(db.Integer, unique=True, nullable=False, primary_key=True) id = db.Column(db.Integer, db.Sequence('genre_id_seq'), primary_key=True )
name = db.Column(db.String(50), unique=False, nullable=False) name = db.Column(db.String(50), unique=True, nullable=False)
def __repr__(self): def __repr__(self):
return "<id: {}, name: {}>".format(self.id,self.name) return "<id: {}, name: {}>".format(self.id,self.name)
@@ -35,13 +37,24 @@ class GenreForm(FlaskForm):
################################################################################ ################################################################################
@app.route("/genres", methods=["GET"]) @app.route("/genres", methods=["GET"])
def genres(): def genres():
genres = Genre.query.all() objects = Genre.query.order_by('id').all()
return render_template("show_id_name.html", objects=genres, page_title='Show All Genres', url_base='genre') return render_template("show_id_name.html", objects=objects, page_title='Show All Genres', url_base='genre', alert=st.GetAlert(), message=st.GetMessage() )
################################################################################
def GetGenres(): # /genre -> GET/POST -> creates a new genre type and when created, takes you back to /genres
genres = Genre.query.order_by('name').all() ################################################################################
return genres @app.route("/genre", methods=["GET", "POST"])
def new_genre():
form = GenreForm(request.form)
if 'name' not in request.form:
return render_template("edit_id_name.html", form=form, page_title='Create new Genre' )
else:
genre = Genre( name=request.form["name"] )
db.session.add(genre)
db.session.commit()
st.SetMessage( "Created new Genre (id={})".format(genre.id) )
genres = Genre.query.order_by('id').all()
return redirect( '/genres' )
################################################################################ ################################################################################
# /genre/<id> -> GET/POST(save or delete) -> shows/edits/delets a single genre # /genre/<id> -> GET/POST(save or delete) -> shows/edits/delets a single genre
@@ -49,22 +62,31 @@ def GetGenres():
@app.route("/genre/<id>", methods=["GET", "POST"]) @app.route("/genre/<id>", methods=["GET", "POST"])
def genre(id): def genre(id):
### DDP: should this be request.form or request.values? ### DDP: should this be request.form or request.values?
alert="Success" form = GenreForm(request.form)
genre_form = GenreForm(request.form) if request.method == 'POST' and form.validate():
if request.method == 'POST' and genre_form.validate():
id = request.form['id']
genre = Genre.query.get(id) genre = Genre.query.get(id)
try: if 'delete' in request.form:
request.form['submit'] st.SetMessage("Successfully deleted (id={}, name={})".format( genre.id, genre.name ) )
except: genre = Genre.query.filter(Genre.id==id).delete()
message="Sorry, Deleting unsupported at present" if 'submit' in request.form:
alert="Danger" st.SetMessage("Successfully Updated Genre (id={})".format(id) )
else:
genre.name = request.form['name'] genre.name = request.form['name']
db.session.commit() db.session.commit()
message="Successfully Updated Genre (id={})".format(id) return redirect( '/genres' )
else: else:
genre = Genre.query.get(id) genre = Genre.query.get(id)
genre_form = GenreForm(request.values, obj=genre) form = GenreForm(request.values, obj=genre)
message="" return render_template("edit_id_name.html", form=form, page_title='Edit Genre' )
return render_template("edit_id_name.html", genre=genre, alert=alert, message=message, form=genre_form, page_title='Edit Genre')
################################################################################
# Gets the Genre matching id from DB, helper func in jinja2 code to show books
################################################################################
def GetGenreById(id):
return Genre.query.get(id).name
################################################################################
# Gets the list of Genres, populates genre_list var in jinja2 code in book.html
################################################################################
def GetGenres():
genres = Genre.query.order_by('name').all()
return genres

View File

@@ -37,35 +37,32 @@ class OwnedForm(FlaskForm):
################################################################################ ################################################################################
@app.route("/owneds", methods=["GET"]) @app.route("/owneds", methods=["GET"])
def owneds(): def owneds():
owneds = Owned.query.order_by('id').all() objects = Owned.query.order_by('id').all()
return render_template("show_id_name.html", objects=owneds, page_title='Show All Ownership types', url_base='owned', alert=st.GetAlert(), message=st.GetMessage() ) return render_template("show_id_name.html", objects=objects, page_title='Show All Ownership types', url_base='owned', alert=st.GetAlert(), message=st.GetMessage() )
################################################################################ ################################################################################
# /owned -> GET/POST -> creates a new owned type and when created, takes you back to /owneds # /owned -> GET/POST -> creates a new owned type and when created, takes you back to /owneds
################################################################################ ################################################################################
@app.route("/owned", methods=["GET", "POST"]) @app.route("/owned", methods=["GET", "POST"])
def new_owned(): def new_owned():
owned_form = OwnedForm(request.form) form = OwnedForm(request.form)
if 'name' not in request.form: if 'name' not in request.form:
owned=None return render_template("edit_id_name.html", form=form, page_title='Create new Owned Type' )
return render_template("edit_id_name.html", owned=owned, form=owned_form, page_title='Create new Owned Type' )
else: else:
owned = Owned( name=request.form["name"] ) owned = Owned( name=request.form["name"] )
db.session.add(owned) db.session.add(owned)
db.session.commit() db.session.commit()
st.SetMessage( "Created new Owned Type (id={})".format(owned.id) ) st.SetMessage( "Created new Owned Type (id={})".format(owned.id) )
owneds = Owned.query.order_by('id').all()
return redirect( '/owneds' ) return redirect( '/owneds' )
################################################################################ ################################################################################
# /owned/<id> -> GET/POST(save or delete) -> shows/edits/delets a single # /owned/<id> -> GET/POST(save or delete) -> shows/edits/delets a single owned
# owned
################################################################################ ################################################################################
@app.route("/owned/<id>", methods=["GET", "POST"]) @app.route("/owned/<id>", methods=["GET", "POST"])
def owned(id): def owned(id):
### DDP: should this be request.form or request.values? ### DDP: should this be request.form or request.values?
owned_form = OwnedForm(request.form) form = OwnedForm(request.form)
if request.method == 'POST' and owned_form.validate(): if request.method == 'POST' and form.validate():
owned = Owned.query.get(id) owned = Owned.query.get(id)
if 'delete' in request.form: if 'delete' in request.form:
st.SetMessage("Successfully deleted (id={}, name={})".format( owned.id, owned.name ) ) st.SetMessage("Successfully deleted (id={}, name={})".format( owned.id, owned.name ) )
@@ -74,11 +71,14 @@ def owned(id):
owned.name = request.form['name'] owned.name = request.form['name']
st.SetMessage("Successfully Updated Owned (id={})".format(id) ) st.SetMessage("Successfully Updated Owned (id={})".format(id) )
db.session.commit() db.session.commit()
owneds = Owned.query.order_by('id').all()
return redirect( '/owneds' ) return redirect( '/owneds' )
else: else:
owned = Owned.query.get(id) obj = Owned.query.get(id)
owned_form = OwnedForm(request.values, obj=owned) form = OwnedForm(request.values, obj=obj)
return render_template("edit_id_name.html", owned=owned, form=owned_form, page_title='Edit Owned Type' ) return render_template("edit_id_name.html", form=form, page_title='Edit Owned Type' )
################################################################################
# Gets the Owned matching id from DB, helper func in jinja2 code to show books
################################################################################
def GetOwnedById(id): def GetOwnedById(id):
return Owned.query.get(id).name return Owned.query.get(id).name

View File

@@ -1,14 +1,16 @@
from wtforms import SubmitField, StringField, HiddenField, SelectField, validators from wtforms import SubmitField, StringField, HiddenField, SelectField, validators
from flask import request, render_template from flask import request, render_template, redirect
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from __main__ import db, app, ma from __main__ import db, app, ma
from sqlalchemy import func, Sequence
from status import st, Status
################################################################################ ################################################################################
# Class describing Rating in the database, and via sqlalchemy, connected to the DB as well # Class describing Rating in the database, and via sqlalchemy, connected to the DB as well
################################################################################ ################################################################################
class Rating(db.Model): class Rating(db.Model):
id = db.Column(db.Integer, unique=True, nullable=False, primary_key=True) id = db.Column(db.Integer, db.Sequence('rating_id_seq'), primary_key=True )
name = db.Column(db.String(50), unique=False, nullable=False) name = db.Column(db.String(50), unique=True, nullable=False)
def __repr__(self): def __repr__(self):
return "<id: {}, name: {}>".format(self.id,self.name) return "<id: {}, name: {}>".format(self.id,self.name)
@@ -19,7 +21,6 @@ class Rating(db.Model):
class RatingSchema(ma.SQLAlchemyAutoSchema): class RatingSchema(ma.SQLAlchemyAutoSchema):
class Meta: model = Rating class Meta: model = Rating
################################################################################ ################################################################################
# Helper class that defines a form for rating, used to make html <form>, with field validation (via wtforms) # Helper class that defines a form for rating, used to make html <form>, with field validation (via wtforms)
################################################################################ ################################################################################
@@ -36,32 +37,49 @@ class RatingForm(FlaskForm):
################################################################################ ################################################################################
@app.route("/ratings", methods=["GET"]) @app.route("/ratings", methods=["GET"])
def ratings(): def ratings():
ratings = Rating.query.order_by('id').all() objects = Rating.query.order_by('id').all()
return render_template("show_id_name.html", objects=ratings, page_title='Show All Ratings', url_base='rating') return render_template("show_id_name.html", objects=objects, page_title='Show All Ratings', url_base='rating', alert=st.GetAlert(), message=st.GetMessage() )
################################################################################ ################################################################################
# /rating/<id> -> GET/POST(save or delete) -> shows/edits/delets a single # /rating -> GET/POST -> creates a new rating type and when created, takes you back to /ratings
# rating ################################################################################
@app.route("/rating", methods=["GET", "POST"])
def new_rating():
form = RatingForm(request.form)
if 'name' not in request.form:
return render_template("edit_id_name.html", form=form, page_title='Create new Rating' )
else:
rating = Rating( name=request.form["name"] )
db.session.add(rating)
db.session.commit()
st.SetMessage( "Created new Rating (id={})".format(rating.id) )
ratings = Rating.query.order_by('id').all()
return redirect( '/ratings' )
################################################################################
# /rating/<id> -> GET/POST(save or delete) -> shows/edits/delets a single rating
################################################################################ ################################################################################
@app.route("/rating/<id>", methods=["GET", "POST"]) @app.route("/rating/<id>", methods=["GET", "POST"])
def rating(id): def rating(id):
### DDP: should this be request.form or request.values? ### DDP: should this be request.form or request.values?
alert="Success" form = RatingForm(request.form)
rating_form = RatingForm(request.form) if request.method == 'POST' and form.validate():
if request.method == 'POST' and rating_form.validate():
id = request.form['id']
rating = Rating.query.get(id) rating = Rating.query.get(id)
try: if 'delete' in request.form:
request.form['submit'] st.SetMessage("Successfully deleted (id={}, name={})".format( rating.id, rating.name ) )
except: rating = Rating.query.filter(Rating.id==id).delete()
message="Sorry, Deleting unsupported at present" if 'submit' in request.form:
alert="Danger" st.SetMessage("Successfully Updated Rating (id={})".format(id) )
else:
rating.name = request.form['name'] rating.name = request.form['name']
db.session.commit() db.session.commit()
message="Successfully Updated Rating (id={})".format(id) return redirect( '/ratings' )
else: else:
rating = Rating.query.get(id) rating = Rating.query.get(id)
rating_form = RatingForm(request.values, obj=rating) form = RatingForm(request.values, obj=rating)
message="" return render_template("edit_id_name.html", form=form, page_title='Edit Rating' )
return render_template("edit_id_name.html", rating=rating, alert=alert, message=message, form=rating_form, page_title='Edit Rating')
################################################################################
# Gets the Rating matching id from DB, helper func in jinja2 code to show books
################################################################################
def GetRatingById(id):
return Rating.query.get(id).name

View File

@@ -52,15 +52,15 @@
<div class="nav-item dropdown"> <div class="nav-item dropdown">
<a class="nav-item dropdown nav-link dropdown-toggle" href="#" id="AdminMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Admin</a> <a class="nav-item dropdown nav-link dropdown-toggle" href="#" id="AdminMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Admin</a>
<div class="dropdown-menu" aria-labelledby="AdminMenu"> <div class="dropdown-menu" aria-labelledby="AdminMenu">
<a class="dropdown-item" href="{{url_for('genres')}}">Create new Genre</a> <a class="dropdown-item" href="/genre">Create new Genre</a>
<a class="dropdown-item" href="{{url_for('genres')}}">Show Genres</a> <a class="dropdown-item" href="{{url_for('genres')}}">Show Genres</a>
<a class="dropdown-item" href="{{url_for('conditions')}}">Create new Condition</a> <a class="dropdown-item" href="/condition">Create new Condition</a>
<a class="dropdown-item" href="{{url_for('conditions')}}">Show Conditions</a> <a class="dropdown-item" href="{{url_for('conditions')}}">Show Conditions</a>
<a class="dropdown-item" href="{{url_for('covertypes')}}">Create new Covertype</a> <a class="dropdown-item" href="/covertype">Create new Covertype</a>
<a class="dropdown-item" href="{{url_for('covertypes')}}">Show Covertypes</a> <a class="dropdown-item" href="{{url_for('covertypes')}}">Show Covertypes</a>
<a class="dropdown-item" href="/owned">Create new Owned Type</a> <a class="dropdown-item" href="/owned">Create new Owned Type</a>
<a class="dropdown-item" href="{{url_for('owneds')}}">Show Ownership Types</a> <a class="dropdown-item" href="{{url_for('owneds')}}">Show Ownership Types</a>
<a class="dropdown-item" href="{{url_for('ratings')}}">Create new Rating</a> <a class="dropdown-item" href="/rating">Create new Rating</a>
<a class="dropdown-item" href="{{url_for('ratings')}}">Show Ratings</a> <a class="dropdown-item" href="{{url_for('ratings')}}">Show Ratings</a>
<a class="dropdown-item" href="{{url_for('loans')}}">Create new Loan</a> <a class="dropdown-item" href="{{url_for('loans')}}">Create new Loan</a>
<a class="dropdown-item" href="{{url_for('loans')}}">Show Loans</a> <a class="dropdown-item" href="{{url_for('loans')}}">Show Loans</a>