This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options("/*", (request, response) -> { | |
String accessControlRequestHeaders = request.headers("Access-Control-Request-Headers"); | |
if (accessControlRequestHeaders != null) { | |
response.header("Access-Control-Allow-Headers", accessControlRequestHeaders); | |
} | |
String accessControlRequestMethod = request.headers("Access-Control-Request-Method"); | |
if (accessControlRequestMethod != null) { | |
response.header("Access-Control-Allow-Methods", accessControlRequestMethod); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The simplest solution I found is to set up an event for each table that executes a method after the table is created. | |
# Database initial data | |
INITIAL_DATA = { | |
'users': [ | |
{ | |
'username': 'superuser', | |
'email': '[email protected]', | |
'hashed_password': hash_password('123') |