将Django-oscar安装为新项目,并在项目目录上包含oscar文件 [英] Django-oscar installation as new project with oscar files on project directory
问题描述
我想在Django中启动一个新项目.我想使用一些来自Github的django-oscar应用程序.
I would like to start a new Project in Django. I want to use some django-oscar apps from Github.
Django-oscar已经提供了[pip infall django-oscar]命令来安装它.但是这次osacar文件进入了站点包目录.我希望它们在我当前的项目目录中.有什么解决办法吗?
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.
推荐答案
克隆github项目,然后运行 make sandbox
,它将安装要求,但不会安装/复制oscar应用程序添加到 site-packages
文件夹中.它将在原处使用它.
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
注意事项:如果您使用的是Windows,请考虑使用流浪汉(或手动设置Linux虚拟机),因为至少有一项oscar要求(
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.
这篇关于将Django-oscar安装为新项目,并在项目目录上包含oscar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!