views:

79

answers:

3

Hi,

I'm working on my honor society's website, and I'm wondering if (1.) can two websites (Django projects) point to the same database, and (2.) if that's good practice.

Background info: Currently there's only one website, and the users for it are for only for members. For our industry relations part (which we are developing now), we want to have companies be able to log in for things like requesting information sessions, resumes, etc. The way things are right now makes it difficult to introduce a new type of user (in this case, the companies). So I was thinking it'd be better to decouple the company side of things to a new website, making the users there strictly for companies. But this website would still need access to the info on our main site, so we were thinking of making it point to the same database.

Any other suggestions are welcome! :)

+1  A: 

It can quite easily be done. Just a matter of the same database details in the settings file.

It could reasonably be used for..

  • A django site applying functionality on a legacy databsae app.
  • A sattelite microsite, using a different domain and url scheme

The only disadvantages may be in keeping track of administration/user functionality but thats not a big one

michael
Thanks for the response! That was exactly what I needed to know.
Andrew
A: 

I do believe that every app in Django's DB has its tables prepended by appname_. Is that what you mean?

AJ
A: 

Very common. Techniques like this are common for avoiding redundant data, which is usually a bad thing. Otherwise someone (or some ugly program) ends up trying to keep them in sync.

le dorfier
Cool, thanks! I was worried that this was bad technique.
Andrew