Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

dashboard.rst 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. =========
  2. Dashboard
  3. =========
  4. The dashboard is the backend interface for managing the store. That includes the
  5. product catalogue, orders and stock, offers etc. It is intended as a
  6. complete replacement of the Django admin interface.
  7. The app itself only contains a view that serves as a kind of homepage, and
  8. some logic for managing the navigation (in ``nav.py``). There's several sub-apps
  9. that are responsible for managing the different parts of the Oscar store.
  10. Permission-based dashboard
  11. --------------------------
  12. Staff users (users with ``is_staff==True``) get access to all views in the
  13. dashboard. To better support Oscar's use for marketplace scenarios, the
  14. permission-based dashboard has been introduced. If a non-staff user has
  15. the ``partner.dashboard_access`` permission set, she is given access to a subset
  16. of views, and her access to products and orders is limited.
  17. :class:`~oscar.apps.partner.abstract_models.AbstractPartner` instances
  18. have a :attr:`~oscar.apps.partner.abstract_models.AbstractPartner.users` field.
  19. Prior to Oscar 0.6, this field was not used. Since Oscar 0.6, it is used solely
  20. for modelling dashboard access.
  21. If a non-staff user with the ``partner.dashboard_access`` permission is in
  22. :attr:`~oscar.apps.partner.abstract_models.AbstractPartner.users`, she can:
  23. * Create products. It is enforced that at least one stock record's partner has
  24. the current user in ``users``.
  25. * Update products. At least one stock record must have the user in the stock
  26. record's partner's ``users``.
  27. * Delete and list products. Limited to products the user is allowed to update.
  28. * Managing orders. Similar to products, a user get access if one of an order's
  29. lines is associated with a matching partner.
  30. For many marketplace scenarios, it will make sense to ensure at checkout that
  31. a basket only contains lines from one partner.
  32. Please note that the dashboard currently ignores any other permissions,
  33. including `Django's default permissions`_.
  34. .. _Django's default permissions: https://docs.djangoproject.com/en/dev/topics/auth/default/#default-permissions
  35. Abstract models
  36. ---------------
  37. None.
  38. Views
  39. -----
  40. .. automodule:: oscar.apps.dashboard.views
  41. :members: