|
|
@@ -47,7 +47,8 @@ You can go as far as associating arbitrary models with it. Use the ``entity``
|
|
47
|
47
|
type::
|
|
48
|
48
|
|
|
49
|
49
|
> klass = ProductClass.objects.create(name='foo', slug='bar')
|
|
50
|
|
- > ProductAttribute.objects.create(product_class=klass, name='admin user', code='admin_user')
|
|
|
50
|
+ > ProductAttribute.objects.create(
|
|
|
51
|
+ product_class=klass, name='admin user', code='admin_user', type='entity')
|
|
51
|
52
|
<ProductAttribute: admin user>
|
|
52
|
53
|
> p = Product(product_class=klass)
|
|
53
|
54
|
|
|
|
@@ -76,4 +77,4 @@ Going further
|
|
76
|
77
|
|
|
77
|
78
|
Oscar's modelling options don't stop there. If the existing framework does not
|
|
78
|
79
|
suit your need, you can always :doc:`customise </howto/how_to_customise_models>`
|
|
79
|
|
-any involved models. E.g. the ``Product`` model is often customised!
|
|
|
80
|
+any involved models. E.g. the ``Product`` model is often customised!
|