0

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.

rafalmp
  • 3,988
  • 3
  • 28
  • 34
Starling
  • 3
  • 1
  • 2
  • Honestly, you probably don't want Oscar in your project directory--it has a ton of apps! Plus, you can override any particular app or model by following the "Customisation" instructions. I keep Oscar github open in one window to reference while coding in another. – Nostalg.io Oct 17 '14 at 07:57

1 Answers1

0

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.

vikki
  • 2,766
  • 1
  • 20
  • 26
  • Thanks for the reply.. If I need to create a project named how can I create it from the local git source. I am using a MacBook Pro and I don't have any issue vita Unix commands. If I create a new virtualenv and create a new django project named store. Then is it possible to add the osacr-apps by copy-paste it in my project directory. – Starling Apr 25 '14 at 19:24
  • Sure you can. You can start with either the demo or the sandbox app and build upon them. Or you can check Oscar's docs, there's a page on how to build a store from scratch. – vikki Apr 25 '14 at 22:27
  • Yes it is possible. thanks for the information. here are the steps I followed 1. virtualenv store 2. pip install django==1.6 3. Install required lib like pillow... 4. download django-oscar git source 5. copy the oscar folder from django-oscar folder and paste it inside store project 6. modify settings.py and urls.py – Starling Apr 26 '14 at 00:46