title: Projet_Flask - Arguments error
body: <p>I'm currently doing a project on Flask. One of my my page is the login page. I'm habing an error on this page</p>
  
  <blockquote>
    <p>TypeError: accueil_template() takes 0 positional arguments but 2 were
    given</p>
  </blockquote>
  
  <p>Here is my app.py code :</p>
  
  <pre><code>@app.route('/login/', methods=['POST'])
  def do_admin_login():
  
      if request.form['password'] == 'password' and request.form['username'] `== 'admin'`:
  
          session['logged_in'] = True
          return accueil_template
      else:
          flash('wrong password!')
      return accueil_template()
  </code></pre>
  
  <p>And my HTML code is the following one :</p>
  
  <pre><code>{% extends 'layout.html' %}
  
  {% block titre %}
      Acceuil
  {% endblock %}
  
  {% block body %}
      {% if session['logged_in'] %}
      &lt;p&gt;You're logged in already!&lt;/p&gt;
      {% else %}
      &lt;form action="/login/" method="POST"&gt;
      &lt;input type="username" name="username" placeholder="Username" value="{{
          request.form.username }}"&gt;
      &lt;input type="password" name="password" placeholder="Password" value="{{
          request.form.password }}"&gt;
      &lt;input type="submit" value="Login"&gt;
      &lt;/form&gt;
      {% endif %}
  
  {% endblock %}
  </code></pre>
  
  <p>I don't understand What happen ? Why I have this error ? </p>
  
  <p>Thanx for your help.</p>