Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ===============
  2. Deploying Oscar
  3. ===============
  4. Oscar is a just a set of Django apps - it doesn't have any special deployment
  5. requirements. That means the excellent Django docs for `deployment`_
  6. should be your first stop. This page then only distills some of the experience
  7. gained from running Oscar projects.
  8. Performance
  9. -----------
  10. Setting up caching is crucial for a good performance. Oscar's templates are
  11. split into many partials, hence it is recommended to use the
  12. `cached template loader`_. Sorl also will hit your database hard if you run it
  13. without a cache backend.
  14. If your memory constraints are tight and you can only run one Python worker,
  15. LocMemCache will usually outperform external cache backends due to the lower
  16. overhead. But once you can scale beyond one worker, it makes good sense to
  17. switch to something like memcached or redis.
  18. Blocking in views should be avoided if possible. That is especially true for
  19. external API calls and sending emails. Django's pluggable email backends allow
  20. for switching out the blocking SMTP backend to a custom non-blocking solution.
  21. Possible options are storing emails in a database or cache for later consumption
  22. or triggering an external worker, e.g. via `django-celery`_.
  23. `django_post-office`_ works nicely.
  24. Security
  25. --------
  26. Oscar relies on the Django framework for security measures and therefore no
  27. Oscar specific configurations with regard to security are in place. See
  28. `Django's guidelines for security`_ for more information.
  29. `django-secure`_ is a nice app that comes with a few sanity checks for
  30. deployments behind SSL.
  31. .. _deployment: https://docs.djangoproject.com/en/dev/howto/deployment/
  32. .. _`Django's guidelines for security`: _https://docs.djangoproject.com/en/dev/topics/security/
  33. .. _`cached template loader`: https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.cached.Loader
  34. .. _django-celery: http://www.celeryproject.org/
  35. .. _django-secure: https://pypi.python.org/pypi/django-secure
  36. .. _django_post-office: https://github.com/ui/django-post_office