Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

sandbox.rst 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 Oscan 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 illustates how Oscar can be
  29. redesigned and customised to build a 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. Browse the external sandbox site
  39. ================================
  40. An instance of the sandbox site is build hourly from master branch and made
  41. available at http://latest.oscarcommerce.com
  42. .. warning::
  43. It is possible for users to access the dashboard and edit the site content.
  44. Hence, the data can get quite messy. It is periodically cleaned up.
  45. Browse the external demo site
  46. =============================
  47. An instance of the demo site is built periodically (but not automatically) and
  48. available at http://demo.oscarcommerce.com
  49. Running the sandbox locally
  50. ===========================
  51. It's pretty straightforward to get the sandbox site running locally so you can
  52. play around with the source code.
  53. Install Oscar and its dependencies within a virtualenv::
  54. $ git clone git@github.com:tangentlabs/django-oscar.git
  55. $ cd django-oscar
  56. $ mkvirtualenv oscar
  57. (oscar) $ make sandbox
  58. (oscar) $ sites/sandbox/manage.py runserver
  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
  64. Running the demo locally
  65. ========================
  66. Assuming you've already set-up the sandbox site, there are two further services
  67. required to run the demo site:
  68. * A spatially aware database such as PostGIS. The demo site uses
  69. django-oscar-stores which requires a spatial capabilities for store searching.
  70. * A search backend that supports faceting, such as Solr. You should use the
  71. sample schema file from ``sites/demo/deploy/solr/schema.xml``.
  72. Once you have set up these services, create a local settings file from a template
  73. to house your creds::
  74. (oscar) $ cp sites/demo/settings_local{.sample,}.py
  75. (oscar) $ vim sites/demo/settings_local.py # Add DB creds
  76. Now build the demo site::
  77. (oscar) $ make demo
  78. (oscar) $ sites/demo/manage.py runserver
  79. The demo (initialised with a sample set of products) will be available
  80. at: http://localhost:8000.