Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
class Seller(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey(''))
business_registration = db.Column(db.Boolean())
phone = db.Column(db.String(80), unique=True)
@app.route('/register_seller', methods=['GET', 'POST'])
def register_seller():
if request.method == 'POST':
email = request.form['email']
password = request.form['password']
phone = request.form['phone']
# Create a new seller,that admin should set business_registration
#Verify whether business_registration is done
seller = Seller(email=email, password=hash_password(password),phone=phone, business_registration = 0)
return 'Seller registered successfully.'
return render_template('register_seller.html')