Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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! :)

share|improve this question
add comment (requires an account with 50 reputation)

3 Answers

up vote 1 down vote accepted

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

share|improve this answer
Thanks for the response! That was exactly what I needed to know. – Andrew Feb 7 '10 at 3:55
add comment (requires an account with 50 reputation)

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

share|improve this answer
add comment (requires an account with 50 reputation)

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.

share|improve this answer
Cool, thanks! I was worried that this was bad technique. – Andrew Feb 7 '10 at 3:56
add comment (requires an account with 50 reputation)

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.