mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 04:42:22 -06:00
Basic Support for Python 3 (#827)
* Rudimentary python3 support * update docs and trigger Travis * fix some of the tests * fix all python3 errors * change env calls to just python * add @python_2_unicode_compatible decorator to models for python2 compatibility * switch netbox.configuration to from netbox import configuration
This commit is contained in:
@@ -50,7 +50,7 @@ class FlatJSONRenderer(renderers.BaseRenderer):
|
||||
def render(self, data, media_type=None, renderer_context=None):
|
||||
|
||||
def flatten(entry):
|
||||
for key, val in entry.iteritems():
|
||||
for key, val in entry.items():
|
||||
if isinstance(val, dict):
|
||||
for child_key, child_val in flatten(val):
|
||||
yield "{}_{}".format(key, child_key), child_val
|
||||
|
||||
Reference in New Issue
Block a user