I try to think aloud about it. What is clear: * All shops can use the same project directory, the same localsite app (or as little as possible)
* All shops should use different SITE_ID even if they would be separated by other means. What is unclear * The key question is if it is better to do it with one or many databases. It is hard to decide and even harder to change. * It is easy to configure the webserver (I remember it for nginx) that for all subdomains if uses the same socket of the same Django app. It is also not possible to allow start new servers with ~100 MB memory by click of button for a trial period before shop payment. (easy denial of service attack. a small required initial payment can prevent such kid playing) - multishop extension is not for your case. Until you have very high number of instances, it does not pay at all to develop complicated optimization. I know only a little about customizing of Django admin. This would be the hardest part if you would use a common database for all. Solution: Read good about using multiple databases in Django, namely about database routing. [1] You can use it without changing anything in Satchmo and maybe a little in Django and the main done by writing a db router and adding it to settings.py. Every eshop will use two databases: a complete one small it's own used for reading and writing and one big common used for writing. Some your common applications will use the common database because you can have permission for all. You can use a proxy model [2] in your app easily derived from Satchmo/Django app.and that makes the difference what to use by db router. The advantage is, that you can start with something very simple and every small database should be completely stand-alone. This seems very similar to database programming: do define events what other should be done on update on insert on delete. What should be done in advance is to use the same generators of row ID for all similar databases on order they are unique between databases. [1] https://docs.djangoproject.com/en/1.3/topics/db/multi-db/#automatic-database-routing [2] https://docs.djangoproject.com/en/1.3/topics/db/models/#proxy-models That is only brain-storming. I have no practical expirience with it. I only read some source codes in addition to documentation in the past to understand how it works Hynek . On 29 ún, 09:26, Alec Taylor <[email protected]> wrote: > On Mon, Feb 27, 2012 at 4:31 AM, hynekcer <[email protected]> wrote: > > Alec, > > Is it important for you to have the same domain without subdomains? > > You can easily define in DNS that *.yoursite.com is your IP address. > > > What you must modify the most is the admin, because the superuser of > > one shop should have no permissions in other shop. I think you should > > look for one of packages which customize Django permission and ask in > > Django groups. > > > If you want completely different shops it is better. > > Thanks hynekcer. > > I don't mind subdomains, just not different domains. :] > > To keep complexity down, I was thinking to modify clonesatchmo.py to > assign the super-user account to a default one (with same auth across > all shops), create a sepearate role: "shop manager" and finally add an > entry into the ListOfShops Model with the shop info + subdomain link. > > Envisioning how to do this with multiple Django installs is obvious. > How can I do this with one Django install? > > Thanks for all suggestions, > > Alec Taylor -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
