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 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. =====================
  2. Sample Oscar projects
  3. =====================
  4. Oscar ships with two sample projects: a 'sandbox' site, which is a vanilla install of Oscar using the
  5. default templates and styles, and a fully featured 'demo' site which demonstrates how Oscar can be
  6. re-skinned and customised to model a domain.
  7. The sandbox site
  8. ----------------
  9. The sandbox site is a minimal implementation of Oscar, where everything is left
  10. in its default state. It is useful for exploring Oscar's functionality
  11. and developing new features.
  12. It only has two customisations on top of Oscar's core:
  13. * Two shipping methods are specified so that the shipping method step of
  14. checkout is not skipped. If there is only one shipping method (which is true of core
  15. Oscar) then the shipping method step is skipped as there is no choice to be
  16. made.
  17. * A profile class is specified which defines a few simple fields. This is to
  18. demonstrate the account section of Oscar, which introspects the profile class
  19. to build a combined User and Profile form.
  20. Note that some things are deliberately not implemented within core Oscar as they
  21. are domain-specific. For instance:
  22. * All tax is set to zero
  23. * No shipping methods are specified. The default is free shipping.
  24. * No payment is required to submit an order as part of the checkout process
  25. The sandbox is, in effect, the blank canvas upon which you can build your site.
  26. The demo site
  27. -------------
  28. The demo site is *the* reference Oscar project as it illustrates how Oscar can
  29. be redesigned and customised to build an e-commerce store. The demo site is a
  30. sailing store selling a range of different product types.
  31. The customisations on top of core Oscar include:
  32. * A new skin
  33. * A variety of product types including books, clothing and downloads
  34. * Payment with PayPal Express using django-oscar-paypal_.
  35. * Payment with bankcards using Datacash using django-oscar-datacash_.
  36. .. _django-oscar-paypal: https://github.com/tangentlabs/django-oscar-paypal
  37. .. _django-oscar-datacash: https://github.com/tangentlabs/django-oscar-datacash
  38. .. note::
  39. Both the sandbox and demo site have the Django admin interface wired up.
  40. This is done as a convenience for developers to browse the database at
  41. ORM level. It also serves as an easy method to manually create a product
  42. class or partner.
  43. Having said that, the Django admin interface is *unsupported* and will fail
  44. or be of little use for some models. At the time of writing, editing
  45. products in the admin is clunky and slow, and editing categories is
  46. not supported at all.
  47. Browse the external sandbox site
  48. ================================
  49. An instance of the sandbox site is build hourly from master branch and made
  50. available at http://latest.oscarcommerce.com
  51. .. warning::
  52. It is possible for users to access the dashboard and edit the site content.
  53. Hence, the data can get quite messy. It is periodically cleaned up.
  54. Browse the external demo site
  55. =============================
  56. An instance of the demo site is built periodically (but not automatically) and
  57. available at http://demo.oscarcommerce.com
  58. Running the sandbox locally
  59. ===========================
  60. It's pretty straightforward to get the sandbox site running locally so you can
  61. play around with the source code.
  62. Install Oscar and its dependencies within a virtualenv::
  63. $ git clone git@github.com:tangentlabs/django-oscar.git
  64. $ cd django-oscar
  65. $ mkvirtualenv oscar
  66. (oscar) $ make sandbox
  67. (oscar) $ sites/sandbox/manage.py runserver
  68. If you do not have mkvirtualenv, then replace that line with::
  69. $ virtualenv oscar
  70. $ . ./oscar/bin/activate
  71. (oscar) $
  72. The sandbox site (initialised with a sample set of products) will be available
  73. at: http://localhost:8000. A sample superuser is installed with credentials::
  74. username: superuser
  75. email: superuser@example.com
  76. password: testing
  77. Running the demo locally
  78. ========================
  79. Assuming you've already set-up the sandbox site, there are two further services
  80. required to run the demo site:
  81. * A spatially aware database such as PostGIS. The demo site uses
  82. django-oscar-stores which requires a spatial capabilities for store searching.
  83. * A search backend that supports faceting, such as Solr. You should use the
  84. sample schema file from ``sites/demo/deploy/solr/schema.xml``.
  85. Once you have set up these services, create a local settings file from a template
  86. to house your creds::
  87. (oscar) $ cp sites/demo/settings_local{.sample,}.py
  88. (oscar) $ vim sites/demo/settings_local.py # Add DB creds
  89. Now build the demo site::
  90. (oscar) $ make demo
  91. (oscar) $ sites/demo/manage.py runserver
  92. The demo (initialised with a sample set of products) will be available
  93. at: http://localhost:8000.