Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

deploying.rst 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. Security
  24. --------
  25. Oscar relies on the Django framework for security measures and therefore no
  26. Oscar specific configurations with regard to security are in place. See
  27. `Django's guidelines for security`_ for more information.
  28. `django-secure`_ is a nice app that comes with a few sanity checks for
  29. deployments behind SSL.
  30. .. _deployment: https://docs.djangoproject.com/en/dev/howto/deployment/
  31. .. _`Django's guidelines for security`: _https://docs.djangoproject.com/en/dev/topics/security/
  32. .. _`cached template loader`: https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.cached.Loader
  33. .. _django-celery: http://www.celeryproject.org/
  34. .. _django-secure: https://pypi.python.org/pypi/django-secure