Install Oscar and its dependencies within a virtualenv:
$git clone https://github.com/django-oscar/django-oscar.git
$ cd django-oscar
$ mkvirtualenv oscar # needs virtualenvwrapper
(oscar) $ make sandbox
(oscar) $ sandbox/manage.py runserver
Warning
git clone --depth 1 https://github.com/django-oscar/django-oscar.git
git pull --unshallow
or
git fetch --unshallow
If you do not have mkvirtualenv
, then replace that line with:
$ virtualenv oscar
$ source ./oscar/bin/activate
(oscar) $
The sandbox site (initialised with a sample set of products) will be available at: http://localhost:8000. A sample superuser is installed with credentials:
username: superuser
email: superuser@example.com
password: testing
参考:
http://www.talebook.org/blog/page/28.html
http://django-oscar.readthedocs.io/en/latest/internals/sandbox.html#the-sandbox-site
网友评论