title: register function for all urls in flask
body: <p>HI i have a function in my views file which i need to be use in my header file , which is common to all templates , </p>
  
  <pre><code>@app.route('/admin/')   
  def adminhome():
      row1 =''
      try:
          db = connect_db()
          rows=g.db.query("SELECT * FROM `auth_user` order by id DESC ")
          rows1 = list(rows)
          data=''
          if len(rows1) &gt; 0:
              users = rows1
          #close_db(db)
      except Exception as e:
          users = e   
  
      return render_template('admin/index.html',users=users)
  </code></pre>
  
  <p>but this function just works for </p>
  
  <blockquote>
    <p>@app.route('/admin/')</p>
  </blockquote>
  
  <p>how can i register this function for all urls </p>