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.
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.