Cheers, The nice thing is, you can import your models to any application.
For instance, you have app1/gallery with models.py inside that defines Photo and Gallery, and you have app2/photorating with models.py inside. You need for your Rating model in app2 to use the Photo model of app1. No worries, just: from app1.gallery.models import Photo and use it in your app2 models.py. Hope it helps, G On 10/30/06, Vortexmind <[EMAIL PROTECTED]> wrote: > > Hi > I'm new to django and I've finished the tutorial. I want now to develop > an application of mine, but before starting I have a question. In the > tutorial (the polls app) we define a model (Pool, Choice) inside an app > (polls app). > > But what I can do if I must share a model between multiple apps? For > example, I can have a database of something (for example, a photography > collection with photos and albums). I can create a "gallery" app that > list all the photos and display each photo. But I could decide to start > a "photorating" app that let the user rate all single photos one by one > (like, http://www.hotornot.com/ just to make an example : ))) > > Well, in this case I should insert the appropriate view action in the > "gallery" app. But what if I wanted to create a new app? Do I have to > redeclare the models in the new app? Or is there a way to share them? > > Thank you for any advices! > Paolo > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---