You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sandbox.rst 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. .. spelling::
  2. uWSGI
  3. =====================
  4. Sample Oscar projects
  5. =====================
  6. Oscar ships with one sample project: a 'sandbox' site, which is a vanilla
  7. install of Oscar using the default templates and styles.
  8. The sandbox site
  9. ----------------
  10. The sandbox site is a minimal implementation of Oscar where everything is left
  11. in its default state. It is useful for exploring Oscar's functionality
  12. and developing new features.
  13. It only has one notable customisation on top of Oscar's core:
  14. * A profile class is specified which defines a few simple fields. This is to
  15. demonstrate the account section of Oscar, which introspects the profile class
  16. to build a combined User and Profile form.
  17. Note that some things are deliberately not implemented within core Oscar as they
  18. are domain-specific. For instance:
  19. * All tax is set to zero.
  20. * No shipping methods are specified. The default is free shipping which will
  21. be automatically selected during checkout (as it's the only option).
  22. * No payment is required to submit an order as part of the checkout process.
  23. The sandbox is, in effect, the blank canvas upon which you can build your site.
  24. Browse the external sandbox site
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. An instance of the sandbox site is built hourly from master branch and made
  27. available at http://latest.oscarcommerce.com
  28. .. warning::
  29. It is possible for users to access the dashboard and edit the site content.
  30. Hence, the data can get quite messy. It is periodically cleaned up.
  31. Run the sandbox locally
  32. ~~~~~~~~~~~~~~~~~~~~~~~
  33. It's pretty straightforward to get the sandbox site running locally so you can
  34. play around with Oscar.
  35. .. warning::
  36. While installing Oscar is straightforward, some of Oscar's dependencies
  37. don't support Windows and are tricky to be properly installed, and therefore
  38. you might encounter some errors that prevent a successful installation.
  39. In order to compile uWSGI, which is a dependency of the sandbox, you will
  40. first need to install the Python development headers with:::
  41. $ sudo apt install python3-dev
  42. Install Oscar and its dependencies within a virtualenv:
  43. .. code-block:: bash
  44. $ git clone https://github.com/django-oscar/django-oscar.git
  45. $ cd django-oscar
  46. $ mkvirtualenv --python=python3 oscar # needs virtualenvwrapper
  47. (oscar) $ make sandbox
  48. (oscar) $ sandbox/manage.py runserver
  49. .. warning::
  50. Note, these instructions will install the head of Oscar's 'master' branch,
  51. not an official release. Occasionally the sandbox installation process
  52. breaks while support for a new version of Django is being added (often due
  53. dependency conflicts with 3rd party libraries). Please ask on the mailing
  54. list if you have problems.
  55. If you do not have ``mkvirtualenv``, then replace that line with:
  56. .. code-block:: bash
  57. $ virtualenv --python=python3 oscar
  58. $ source ./oscar/bin/activate
  59. (oscar) $
  60. The sandbox site (initialised with a sample set of products) will be available
  61. at: http://localhost:8000. A sample superuser is installed with credentials::
  62. username: superuser
  63. email: superuser@example.com
  64. password: testing