jazzband / django-ddp

Django/PostgreSQL implementation of the Meteor server.
MIT License
167 stars 29 forks source link

Modifications to enable collection naming to work with meteor #34

Open cxhandley opened 8 years ago

cxhandley commented 8 years ago

I had to make these modifications to get this app to work properly without modification to meteor client.

https://github.com/cxhandley/django-ddp-todos

Not sure if I am not doing things 100% correctly.

Modification was made to api.py as I was getting an error because model._meta couldn't find the collection in self._registry[COLLECTION_PATH_FORMAT.format(name=name)]

The modification to models.py was make because Alea was getting created using collection/django_todos.list/ instead of collection/lists/ causing a mismatch with the client. So I created a field on the model to pass the correct collection name (not ideal)

There might be a better way, i.e. changing something on _meta to make things easier.