title: Why prevent any setup method after the first request is called in Flask?
body: <p>I'm working on a project with Flask and Flask-Restful, trying to get dynamic urls according to input from the user in my Restful API.  I created a class with a get method that will be responding to requests, and when the user calls upon another resource, it activates the new one and a url should be created.</p>
  
  <p>The problem comes when I try to add a new resource to my api, which calls the function setupmethod in Flask that checks if the app is in debug and if the first request was already made.</p>
  
  <pre><code> if self.debug and self._got_first_request:
       raise AssertionError('A setup function was called after the '
       'first request was handled. This usually indicates a bug '
       'in the application where a module was not imported '
       'and decorators or other functionality was called too late.\n'
       'To fix this make sure to import all your view modules, '
       'database models and everything related at a central place '
       'before the application starts serving requests.')
  </code></pre>
  
  <p>One simple way to overcome this would be to modify the add_view function in Flask to avoid this behaviour.  I first want to understand why would you avoid a setup method like creating a view or in my case a resource after the first request is called?</p>