I did this with one settings.py per subdomain, using the sites framework. So each settings.py had a different SITE_ID.

Here's how to limit admin to a given user's records:

http://drumcoder.co.uk/blog/2010/oct/02/user-specific-data-admin/

This helps with droplists in admin:

http://drumcoder.co.uk/blog/2010/oct/02/limiting-records-django-admin/

The above posts also show how to use a manager to limit the records, so you can do

Blog.objects.all() to get all records across all sites, and
Blog.on_site.all() to get the records only for the current site.

Hope that helps,

Tim.

On 23/12/10 04:29, Parra wrote:
Hello,

I'm new to Django and thinking of using it for a project.

In this project, there will be accounts and each account will have a
subdomain.
Based on the subdomain/account, the user will just see the records
that belongs to them.
The tables will be unique for all accounts, so there should be a field
to identify the account/records....

I think this is maybe a common task and that there is a "right" way to
do this...

Can someone give me some tips on where to get started with this ??

Thanks,

Marcello


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@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.

Reply via email to