Bladeren bron

Updated doc on how to customise an app

master
David Winterbottom 13 jaren geleden
bovenliggende
commit
d20b9c6bab
1 gewijzigde bestanden met toevoegingen van 20 en 3 verwijderingen
  1. 20
    3
      docs/source/recipes/how_to_customise_an_app.rst

+ 20
- 3
docs/source/recipes/how_to_customise_an_app.rst Bestand weergeven

@@ -2,9 +2,26 @@
2 2
 How to customise an app
3 3
 =======================
4 4
 
5
-A core part of how oscar can be customised is to create a local version of one of
6
-oscar's apps so that it can be customised.  The way this is done involves a few steps, 
7
-which are detailed here.
5
+A core part of how oscar can be customised is to create a local version of one
6
+of oscar's apps so that it can be modified and extended.  Creating a local
7
+version of an app allows customisation of any of the classes within the
8
+corresponding app in oscar.
9
+
10
+The way this is done involves a few steps, which are detailed here.
11
+
12
+Method
13
+======
14
+
15
+1. Create an app within your project with the same "app label" as an app in oscar.  Eg,
16
+   to create a local version of ``oscar.apps.order``, create something like ``myproject.order``.
17
+
18
+2. Ensure the ``models.py`` in your local app imports all the models from oscar's version::
19
+
20
+   # models.py
21
+   from oscar.apps.order.models import *
22
+
23
+3. Replace oscar's version of the app with your new version in ``INSTALLED_APPS``.
24
+
8 25
 
9 26
 Worked example
10 27
 ==============

Laden…
Annuleren
Opslaan