Re: multiple projects shared database

2009-08-06 Thread Robin Becker

derek wrote:
> 
>>> On the other hand, if the two websites are entirely independent, putting
>>> them into a single database is simply poor design. It's trivial to
>>> create a separate database and why not use the tools that are available
>>> instead of adding extra complexity?!
>> I think the idea is to allow common authorisation between the two sites.
> 
> I am a complete newbie here, so pardon me chipping in, but... would it
> not be possible to do authorisation in one database and then have the
> groups-specific databases being separate?
> 
> Derek
..
I don't think django allows multiple databases except via table name hacks and 
similar.
-- 
Robin Becker

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: multiple projects shared database

2009-08-06 Thread derek


> > On the other hand, if the two websites are entirely independent, putting
> > them into a single database is simply poor design. It's trivial to
> > create a separate database and why not use the tools that are available
> > instead of adding extra complexity?!
>
> I think the idea is to allow common authorisation between the two sites.

I am a complete newbie here, so pardon me chipping in, but... would it
not be possible to do authorisation in one database and then have the
groups-specific databases being separate?

Derek
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: multiple projects shared database

2009-08-06 Thread Robin Becker

Malcolm Tredinnick wrote:
> On Wed, 2009-08-05 at 17:59 +0100, Robin Becker wrote:
>> My boss wants to have two different django controlled websites with a common 
>> database. Is there a way to do this?
>>
>> We are already running multiple websites into a single django project and 
>> because they have a disambiguating term in the urls eg each url has 
>> /lang/brand/path we can map the URLs pretty well.
>>
>> With the multiple django projects & 1 database I am worried there are some 
>> hidden problems waiting to come out and play.
> 
> The only potential problem is the content types. There are entries in
> the content types table for each model and it needs to contain
> information about all the models. So be careful when you're running
> syncdb.

I have already been bitten by the content types thing. I'm not sure I 
understand 
exactly what is using django_content_type, but one of our developers started 
using ContentType as part of an intermodel link structure and although it 
worked 
it is fragile since the content type ids are not guaranteed to be the same 
everywhere.

> 
> What you're trying to do here is not dissimilar to just using different
> settings files for the same database, as in this tip:
> http://www.pointy-stick.com/blog/2009/03/26/django-tip-controlling-admin-or-other-access/
> 
> On the other hand, if the two websites are entirely independent, putting
> them into a single database is simply poor design. It's trivial to
> create a separate database and why not use the tools that are available
> instead of adding extra complexity?!

I think the idea is to allow common authorisation between the two sites.
...
-- 
Robin Becker

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: multiple projects shared database

2009-08-05 Thread Malcolm Tredinnick

On Wed, 2009-08-05 at 17:59 +0100, Robin Becker wrote:
> My boss wants to have two different django controlled websites with a common 
> database. Is there a way to do this?
> 
> We are already running multiple websites into a single django project and 
> because they have a disambiguating term in the urls eg each url has 
> /lang/brand/path we can map the URLs pretty well.
> 
> With the multiple django projects & 1 database I am worried there are some 
> hidden problems waiting to come out and play.

The only potential problem is the content types. There are entries in
the content types table for each model and it needs to contain
information about all the models. So be careful when you're running
syncdb.

What you're trying to do here is not dissimilar to just using different
settings files for the same database, as in this tip:
http://www.pointy-stick.com/blog/2009/03/26/django-tip-controlling-admin-or-other-access/

On the other hand, if the two websites are entirely independent, putting
them into a single database is simply poor design. It's trivial to
create a separate database and why not use the tools that are available
instead of adding extra complexity?!

Regards,
Malcolm



--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: multiple projects shared database

2009-08-05 Thread Luke Seelenbinder

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

There is no problem with that, as long as your code accounts for it.

Luke
luke.seelenbin...@gmail.com


Robin Becker wrote:
> My boss wants to have two different django controlled websites with a common 
> database. Is there a way to do this?
> 
> We are already running multiple websites into a single django project and 
> because they have a disambiguating term in the urls eg each url has 
> /lang/brand/path we can map the URLs pretty well.
> 
> With the multiple django projects & 1 database I am worried there are some 
> hidden problems waiting to come out and play.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkp5vgsACgkQXQrGVCncjPz1PACgnzUvWNdB7xcIf5K0nvKu3IHO
334AnRbzsb9ajiJSWAuHZNxkmRexGq84
=RJj/
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



multiple projects shared database

2009-08-05 Thread Robin Becker

My boss wants to have two different django controlled websites with a common 
database. Is there a way to do this?

We are already running multiple websites into a single django project and 
because they have a disambiguating term in the urls eg each url has 
/lang/brand/path we can map the URLs pretty well.

With the multiple django projects & 1 database I am worried there are some 
hidden problems waiting to come out and play.
-- 
Robin Becker

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---