Sapan Bhatia | 17364fd | 2017-06-18 21:25:33 -0700 | [diff] [blame] | 1 | from core.models.xosbase import * |
| 2 | {% for m in proto.messages %} |
| 3 | from models_decl import {{ m.name }}_decl |
| 4 | {%- endfor %} |
| 5 | |
| 6 | {% for m in proto.messages %} |
| 7 | {% for l in m.links %}{% set peer_name=l.peer.name -%} |
| 8 | {% if peer_name not in proto.message_names -%} |
| 9 | from core.models import {{ peer_name }} |
| 10 | {% endif -%} |
| 11 | {% endfor -%} |
| 12 | {% endfor -%} |
| 13 | |
| 14 | {% for m in proto.messages %} |
| 15 | class {{ m.name }}({{ m.name }}_decl): |
| 16 | class Meta: |
| 17 | proxy = True |
| 18 | |
| 19 | {% endfor %} |
| 20 | +++ models.py |