Wednesday, May 28, 2014

Adding models from one app to another app

This is directory structure of my django site
---- LibreHatti
   |----- src
      |----- useraccounts
      |----- librehatti
         |------- catalog
         |------- reports

Now what we need is to reference a model from useraccounts in librehatti.catalog as a foreign key and I am unable to do that.

I tried by adding 'appname.modelname' in foreign key field but it actually refrences librehatti.useraccounts.address, which is not what I want.

Any help would be appreciated.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/dbacf3d8-b4c7-4859-a883-1122ab9a9d36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment