title: Database connection error of " signup() takes no arguments 4 given"
body: <p>Help me find where am going wrong here please....can't send anything to the database am getting this error "signup() takes no argument 4 given"</p>
  
  <p>This is my model.py file</p>
  
  <pre><code>app.secret_key = '9vY%N\\#l\xd1L\xd6r\xac\xec\xf5\xa6\x01W9_QD\\$'
  app.config['SQLALCHEMY_DATABASE_URI'] =    'postgres://postgres:postgres@localhost/cynthia'
  </code></pre>
  
  <p>#creating tables</p>
  
  <pre><code>class signup(db.Model):
  
      __tablename__= 'users'
  
      id = db.Column(db.Integer, primary_key=True)
      name = db.Column(db.String,nullable=False)
      email = db.Column(db.String,nullable=False)
      password = db.Column(db.String,nullable=False)
      confirm = db.Column(db.String,nullable=False)
  
  
  def __init__(self, username, email, password, confirm):
      self.username= username
      self.email = email
      self.password= bcrypt.generate_password_hash(password)
      self.confirm= bcrypt.generate_password_hash(confirm)
  
  
  def __repr__(self):
      return '&lt;signup %r&gt;' % self.username
  </code></pre>
  
  <p>my view.py is this </p>
  
  <pre><code>@app.route('/signup', methods=['GET', 'POST'])
  def signup():    
    if request.method == "POST":
      user = signup(name= request.form['name'],
      email= request.form['email'],
      password = request.form['password'],
      confirm = request.form['confirm'])
     db.session.add(user)
     db.session.commit()
     flash("You've successfully registered")
  return redirect(url_for('login'))
  </code></pre>
  
  <p>return render_template("signup.html")</p>