Website.add_restriction#
- Website.add_restriction(username, password)#
Makes the app private.
Adds a username and password to the app.
- Parameters:
username (str) –
password (str) –
Behind The Scenes
When calling this method, the following Flask extension is used:
BasicAuth class extension from Flask-BasicAuth package.
The following Flask configurations are also set:
BASIC_AUTH_USERNAME = username
BASIC_AUTH_PASSWORD = password