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.

contributing.rst 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ============
  2. Contributing
  3. ============
  4. Some ground rules:
  5. * To avoid disappointment, new features should be discussed on the mailing list
  6. (django-oscar@googlegroups.com) before serious work starts.
  7. * Pull requests will be rejected if sufficient tests aren't provided.
  8. * Please update the documentation when altering behaviour or introducing new features.
  9. * Follow the conventions (see below).
  10. Installation
  11. ============
  12. From zero to tests passing in 2 minutes (most of which is PIL installing)::
  13. git clone git@github.com:<username>/django-oscar.git
  14. cd django-oscar
  15. mkvirtualenv oscar
  16. ./setup.py develop
  17. pip install -r requirements.txt
  18. ./run_tests.py
  19. Writing docs
  20. ============
  21. There's a helper script for building the docs locally::
  22. cd docs
  23. ./test_docs.sh
  24. Conventions
  25. ===========
  26. General
  27. -------
  28. * PEP8 everywhere while remaining sensible
  29. URLs
  30. ----
  31. * List pages should use plurals, eg ``/products/``, ``/notifications/``
  32. * Detail pages should simply be a PK/slug on top of the list page, eg
  33. ``/products/the-bible/``, ``/notifications/1/``
  34. * Create pages should have 'create' as the final path segment, eg
  35. ``/dashboard/notifications/create/``
  36. * Update pages are sometimes the same as detail pages (ie when in the
  37. dashboard). In those cases, just use the detail convention, eg
  38. ``/dashboard/notifications/3/``. If there is a distinction between the detail
  39. page and the update page, use ``/dashboard/notifications/3/update/``.
  40. * Delete pages, eg /dashboard/notifications/3/delete/
  41. View class names
  42. ----------------
  43. Classes should be named according to::
  44. '%s%sView' % (class_name, verb)
  45. For example, ``ProductUpdateView``, ``OfferCreateView`` and
  46. ``PromotionDeleteView``. This doesn't fit all situations but it's a good basis.