Are you adding REST functionality to an existing project? Or will you be using a separate instance to provide only REST services and maintain two different code bases?
I believe you can use the django-rest-framework to utilize the same views (literally) to provide a REST interface, so you may not need to rewrite or copy anything, just add a few bits of code to make your views aware of incoming REST requests, some URL additions, and serializers for your models.
http://www.django-rest-framework.org/
-James
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/11d2f88e-a159-4e7b-903f-80d0f6e8e74a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't quite understand why the situation you describe requires
duplicating models files. Is the canonical data storage now in Project B
instead of Project A, and Project A gets the data via Project B's REST
API? In that case, why does Project A need those models anymore?