问题
I would like to start a new Project in Django. I want to use some django-oscar apps from Github.
Django-oscar already providing a [pip infall django-oscar] command to install it. But this time osacar files goes to site-package directory. I want them in my current project directory. Is there any solution.
回答1:
Clone the github project, and then run make sandbox
, it will install the requirements but it won't install/copy the oscar app to the site-packages
folder. It will use it from where it is.
Its best to create a new virtual env for this, then create a folder where you want the oscar clone to be. Then run the following commands
git clone https://github.com/tangentlabs/django-oscar.git
make sandbox
python sites/sandbox/manage.py runserver
NB: If you're on windows, consider using vagrant (or manually setting up a linux vm) because at least one of oscar's requirements (sh) is not available on windows. There's an alternative but its years old. That plus you'll generally have an easier with oscar time not using windows.
来源:https://stackoverflow.com/questions/23299063/django-oscar-installation-as-new-project-with-oscar-files-on-project-directory