This repository was archived by the owner on Jan 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,24 @@ Installation
24
24
Example code (foo/models.py)
25
25
----------------------------
26
26
27
- .. code :: Django
27
+ .. code :: Django
28
28
29
29
from django.db import models
30
-
30
+
31
31
from mav.decorators import mav
32
-
32
+
33
33
@mav
34
34
class Foo(models.Model):
35
- name = models.CharField(max_length=100)
36
-
35
+ name = models.CharField(max_length=100)
36
+
37
37
# The @mav decorator will generate a FooAttr class in mav.attrs:
38
-
38
+
39
39
class FooAttr(AbstractModelAttribute):
40
- # Inherited from AbstractModelAttribute
41
- attribute = models.ForeignKey(Attribute)
42
- value = models.TextField(...)
43
- # Generated
44
- object = models.ForeignKey(Foo, related_name='attrs')
40
+ # Inherited from AbstractModelAttribute
41
+ attribute = models.ForeignKey(Attribute)
42
+ value = models.TextField(...)
43
+ # Generated
44
+ object = models.ForeignKey(Foo, related_name='attrs')
45
45
46
46
47
47
Documentation
@@ -82,4 +82,4 @@ Original author & Development lead: `Dylan Verheul <https://github.com/dyve>`_.
82
82
83
83
Thanks to everybody that has contributed pull requests, ideas, issues, comments and kind words.
84
84
85
- Please see AUTHORS.rst for a list of contributors.
85
+ Please see AUTHORS.rst for a list of contributors.
You can’t perform that action at this time.
0 commit comments