Hello, I'll try to sum up my main issues with Django, trying to add a Django ROA/WOA/SOA/BuzzwordOA module which uses a custom backend in order to access remote resources in a RESTful way. Basically, it calls URLs instead of hitting database (a picture is worth a thousand words, look at the schema here: http://welldev.org/django-roa-diagram.png for details).
My first attempt was to create my own backend (as Oracle one) but it eventually looks way too complicated (I don't need all SQL machinery) and I end up with my own Model/Manager classes. I planed to use Meta class in order to add resource URL but I can't because of Meta's restriction: http://code.djangoproject.com/browser/django/trunk/django/db/models/options.py#L89 Eventually, I use a static method because it's easier but I don't know if this restriction is worth the pain. I got an issue with M2M relations because SQL is hardcoded and I can't catch it in Query(Set) object: http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/related.py#L428 It is/will be an issue for all non-sql backend (CouchDB for instance) and I think it should be fixed. Otherwise, I'll need to hack a large part of Django just to support those relations. Integrating auth is not as hard as I thought thanks to inheritance, I just wrote my own remoteauth app and it works. Great. On the other side, integrating admin is more complicated. The main issues come from integrated ContentTypes (I'm still thinking about an elegant way to handle that) and hardcoded way to retrieve objects: http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/options.py#L584 A get_object method on ModelAdmin can solve this issue. In the same attempt, it's useful to be able to easily change the ChangeList class in order to customize url_for_result (for instance), it'll be solved once #9749 is commited. I'm sure people involved in composite PKs #373 will agree with me :) I hope it will not be considered as a rant, my English is pretty basic but I just want to discuss those issues in order to help the community. Regards, David Larlet #9749 http://code.djangoproject.com/ticket/9749 #373 http://code.djangoproject.com/ticket/373 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
