Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

installation.rst 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Installing django-oscar for development
  2. =======================================
  3. Set up `virtualenv` if you haven't already done so::
  4. sudo apt-get install python-setuptools
  5. sudo easy_install pip
  6. sudo pip install virtualenv virtualenvwrapper
  7. echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
  8. Note: Fedora (and possibly other Red Hat based distros) installs virtualenvwrapper.sh in /usr/bin path, so the last line above should read::
  9. echo "source /usr/bin/virtualenvwrapper.sh" >> ~/.basrc
  10. Reload bash with the following command::
  11. ~/.bashrc
  12. Do the following from your workspace folder:
  13. mkdir oscar
  14. cd oscar
  15. mkvirtualenv --no-site-packages oscar
  16. workon oscar
  17. After checking out your fork, install the latest version of Django into your virtualenv (currenty a beta of 1.3)::
  18. wget http://www.djangoproject.com/download/1.3-beta-1/tarball/
  19. pip install Django-1.3-beta-1.tar.gz
  20. Clone this repository to get the latest version of Oscar
  21. Install all packages from the requirements file (optional)::
  22. pip install -r requirements-dev.txt
  23. This just provides some useful tooling for developing a django project - the installed
  24. modules are not mandatory to run oscar.
  25. Install oscar in development mode within your virtual env::
  26. python setup.py develop
  27. Optionally, install all packages from the requirements file::
  28. pip install -r requirements.txt
  29. Note: In case of gcc crashing and complaining in-between installation process,
  30. make sure you have appropriate -devel packages installed (ie. mysql-devel) in
  31. your system.
  32. Now create a `local_settings.py` file which contains details of your local database
  33. that you want to use for development. Be sure to create two databases: one for development
  34. and one for running the unit tests (prefix `test_` on the normal db name).
  35. Developing
  36. ----------
  37. Developing oscar normally involves working on a django project which uses oscar
  38. as a installed app. There are several such projects within the `examples` folder - the
  39. `defaultshop` project does not customise oscar at all and uses everything in its
  40. default format.
  41. Each example shop has its own `manage.py` executable which you can use to create
  42. your database::
  43. ./manage.py syncdb
  44. There is a shortcut script for dropping all of a projects's apps and rerunning `syncdb` in
  45. the `examples` folder - you need to specify which project to act on::
  46. ./recreate_project_tables.sh defaultshop
  47. There is a similar script for running tests::
  48. ./run_tests.sh defaultshop
  49. This specifies a sqlite3 database to use for testing and filters out the useless output.