python - Can I have two structured properties with the same name if they are in different Models? -


according google ndb documentation, model() kinds considered global namespace, should not have 2 ndb models same name, in different files. still, structured properties not full-fledged entities, don't have key , if search console them, not exist, properties of other entities. considering this, can have following code?

this in file_a.py:

class specifications(ndb.model):     #a list of specifications  class car(ndb.model):     specs = ndb.structuredproperty(specifications) 

this in file_b.py:

class specifications(ndb.model):     #another list of specifications  class bike(ndb.model):     specs = ndb.structuredproperty(specifications) 

you can notice better have specifications model defined once not mess around things. but... can define 2 different specifications models on each file.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -