Django Application Model Reference

Chris Angelico rosuav at gmail.com
Sat Nov 5 08:05:19 EDT 2016


On Thu, Nov 3, 2016 at 4:44 AM, Dreyton Scott <drekscott at gmail.com> wrote:
> On Wednesday, November 2, 2016 at 1:40:35 PM UTC-4, Dreyton Scott wrote:
>> Hello. I am currently creating a notification django application that will need to be able to "hook" into another django application. What my app needs is a way to retrieve all model classes in the connected application. Is there a way to do this?
>
> In a way such that my app (a) is connected to app (b). Have (a) retrieve all model class instances in the connected app (b). Is that possible?

You may have to elaborate on "connected" here. Is it able to import
the code of the other app, or is it restricted to HTTP requests and
responses? If the latter, there's no significance to them both being
written in Django; you'll have to create an explicit endpoint that
enumerates the models, probably sending the info as a JSON object.
(Caveat: I don't know Django, but I do know HTTP.)

ChrisA



More information about the Python-list mailing list