Merge pull request #1343 from MatthiasLohr/feature/db-url-path
Allow to specify an actual path using DATABASE_URL
This commit is contained in:
commit
f12196d1c6
@ -258,7 +258,7 @@ WSGI_APPLICATION = 'recipes.wsgi.application'
|
||||
# Load settings from env files
|
||||
if os.getenv('DATABASE_URL'):
|
||||
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')
|
||||
)
|
||||
settings = match.groupdict()
|
||||
|
Loading…
Reference in New Issue
Block a user