So I've got several applications which share the same model/view
structure.  I have kept the applications separate because conceptually
I want them separate in the admin interface, I want them to store
their respective info in separate tables in the database, and most
importantly, I want to retain the ability to tweak one without
affecting the others if it becomes necessary at a later time.

But for now, they are all identical, and I want to avoid duplicating
the model/view code.  I think I understand how to keep the view code
in one place, routing the URLs from all the apps to the same views.py
and templates.

However, it is less clear how to avoid duplicating the models.  It
appears that to install an app, you need to have a unique subdirectory
with its own model.py.  I tried having a fairly empty model.py that
merely imports everything from a master "model.py", but Django doesn't
seem to see the imported models (for example, syncdb doesn't seem to
be aware of the imported models).  I'm thinking that on Unix, it might
be possible to set up a symbolic link to a master model.py, so it
appears that there are multiple model.py files (one in each app
directory), but in fact, there is only one.  However, I'm testing this
on a Windows machine before deploying it, so I'd like to find a
solution that also works under Windows.

Any suggestions?

Thanks,

Mark

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to