篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Django Pycharm Postgres Mac Basic安装说明相关的知识,希望对你有一定的参考价值。
1. Install python 3.6 on your machine
2. Open pycharm
3. Create new project, select Django, make sure to change to Python 3, set project name to whatever you want it to be, set app name in more settings to whatever you want it to be and open
4. Do preferences, project, choose + and install psycopg2-binary (this is needed for postgres)
5. Open a terminal either in pycharm or separately (right click on migrate.py and open terminal)
6. Make sure the postgres DB we did before exists and is running 7) Open settings.py and make the database section:
```
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '[DB_NAME]',
'USER': 'postgres',
'PASSWORD': '[PASSWORD]',
'HOST': 'localhost',
'PORT': '5432',
}
}
```
以上是关于markdown Django Pycharm Postgres Mac Basic安装说明的主要内容,如果未能解决你的问题,请参考以下文章