commit | 9590a88ba684dd26fe73ec8152ca3bc3d4003145 | [log] [tgz] |
---|---|---|
author | Sapan Bhatia <sapan@opennetworking.org> | Tue Aug 01 08:35:23 2017 -0400 |
committer | Sapan Bhatia <sapan@onlab.us> | Tue Aug 01 07:08:27 2017 -0700 |
tree | 9a186c97b09c5d3fb83f616c4c688a044789eb81 | |
parent | a3d2e6298e582230024e163c2697c1af15de5132 [diff] |
CORD-1626: Add support for OneToOne relations Change-Id: I29b72318d8922317b180f2662858548c8f083c35
diff --git a/lib/xos-genx/xosgenx/jinja2_extensions/django.py b/lib/xos-genx/xosgenx/jinja2_extensions/django.py index eaf21d1..4b0af16 100644 --- a/lib/xos-genx/xosgenx/jinja2_extensions/django.py +++ b/lib/xos-genx/xosgenx/jinja2_extensions/django.py
@@ -53,6 +53,8 @@ def xproto_django_link_type(f): if (f['link_type']=='manytoone'): return 'ForeignKey' + elif (f['link_type']=='onetoone'): + return 'OneToOneField' elif (f['link_type']=='manytomany'): if (f['dst_port']): return 'ManyToManyField'