Merge pull request #1343 from MatthiasLohr/feature/db-url-path
Allow to specify an actual path using DATABASE_URL
This commit is contained in:
@ -258,7 +258,7 @@ WSGI_APPLICATION = 'recipes.wsgi.application'
|
|||||||
# Load settings from env files
|
# Load settings from env files
|
||||||
if os.getenv('DATABASE_URL'):
|
if os.getenv('DATABASE_URL'):
|
||||||
match = re.match(
|
match = re.match(
|
||||||
r'(?P<schema>\w+):\/\/(?P<user>[\w\d_-]+)(:(?P<password>[^@]+))?@(?P<host>[^:/]+)(:(?P<port>\d+))?(\/(?P<database>[\w\d_-]+))?',
|
r'(?P<schema>\w+):\/\/(?P<user>[\w\d_-]+)(:(?P<password>[^@]+))?@(?P<host>[^:/]+)(:(?P<port>\d+))?(\/(?P<database>[\w\d\/\._-]+))?',
|
||||||
os.getenv('DATABASE_URL')
|
os.getenv('DATABASE_URL')
|
||||||
)
|
)
|
||||||
settings = match.groupdict()
|
settings = match.groupdict()
|
||||||
|
Reference in New Issue
Block a user