官术网_书友最值得收藏!

Starting the project

This section has the installation instructions for the SuperBook project, which contains all the example code used in this book. Do check out the project's README.md on GitHub https://github.com/DjangoPatternsBook/superbook2 for the latest installation notes. We will be using the pipenv tool to set up the virtual environment and install all dependencies.

Create a separate virtual environment for each Django project.

First, clone the example project from GitHub:

$ git clone https://github.com/DjangoPatternsBook/superbook2.git

Next, install pipenv system-wide or locally, but outside a virtualenv, as recommended in pipenv installation documents. Alternatively, follow these commands:

$ pip install -U pip
$ pip install pipenv

Now go to the project directory and install the dependencies:

$ cd superbook2
$ pipenv install --dev

Next, enter the pipenv shell to start using your freshly created virtual environment with all the dependencies:

$ pipenv shell

Finally, run the project after executing the typical management commands:

$ cd src
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver

You can navigate to http://127.0.0.1:8000 or the URL indicated in your Terminal and feel free to play around with the site.

主站蜘蛛池模板: 金秀| 望江县| 民乐县| 开远市| 宜城市| 兴城市| 宿迁市| 韶山市| 乌兰察布市| 仁布县| 通江县| 盐边县| 南丹县| 屯留县| 灵丘县| 新沂市| 莆田市| 遵义县| 东宁县| 新密市| 临沭县| 都江堰市| 工布江达县| 宽甸| 新丰县| 邵武市| 正安县| 乌鲁木齐市| 望奎县| 阿坝| 镇康县| 张家界市| 苏尼特右旗| 桐柏县| 读书| 宜丰县| 江阴市| 夹江县| 从江县| 大同市| 东阳市|