简体   繁体   中英

Create Azure web site with Django and postgresql

I have django + postgresql web site.

I want publish them to Azure web site.

How I can sync db, or create postgresql database in azure web site?

If I can do it, what I need write in settings file?

DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': 'xxx',
            'USER': 'xxx',
            'PASSWORD': 'xxx',
            'HOST': 'xxx',
            #'PORT': 'xxx',
        }
    }

You can publish your app to Azure App Service (web apps, formerly web sites, is within the App Service). However, you won't be able to install postgres there. Instead, you'll need to install that to a VM (or use a 3rd-party postgresql hoster).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM