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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 made available at https://latest.oscarcommerce.com
  27. .. warning::
  28. It is possible for users to access the dashboard and edit the site content.
  29. Hence, the data can get quite messy. It is periodically cleaned up.
  30. Run the sandbox locally
  31. ~~~~~~~~~~~~~~~~~~~~~~~
  32. It's pretty straightforward to get the sandbox site running locally so you can
  33. play around with Oscar.
  34. .. warning::
  35. While installing Oscar is straightforward, some of Oscar's dependencies
  36. don't support Windows and are tricky to be properly installed, and therefore
  37. you might encounter some errors that prevent a successful installation.
  38. In order to compile uWSGI, which is a dependency of the sandbox, you will
  39. first need to install the Python development headers with:::
  40. $ sudo apt install python3-dev
  41. Install Oscar and its dependencies within a virtualenv:
  42. .. code-block:: bash
  43. $ git clone https://github.com/django-oscar/django-oscar.git
  44. $ cd django-oscar
  45. $ mkvirtualenv --python=python3 oscar # needs virtualenvwrapper
  46. (oscar) $ make sandbox
  47. (oscar) $ sandbox/manage.py runserver
  48. .. warning::
  49. Note, these instructions will install the head of Oscar's 'master' branch,
  50. not an official release. Occasionally the sandbox installation process
  51. breaks while support for a new version of Django is being added (often due
  52. dependency conflicts with 3rd party libraries). Please ask on the mailing
  53. list if you have problems.
  54. If you do not have ``mkvirtualenv``, then replace that line with:
  55. .. code-block:: bash
  56. $ virtualenv --python=python3 oscar
  57. $ source ./oscar/bin/activate
  58. (oscar) $
  59. The sandbox site (initialised with a sample set of products) will be available
  60. at: http://localhost:8000. A sample superuser is installed with credentials::
  61. username: superuser
  62. email: superuser@example.com
  63. password: testing