You sure can Nigel.

Let's say you have a model called Notes, where users can enter their notes
that they only can see.

You add User model (in 1.4 from django.contrib.auth.models, in 1.5 same or
you can extend AbstractUser) as a foreign key to Notices.

Here's some info on FK
https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey

When the user logs in you can obtain that user from "request.user", so when
they create a Notice you save the user as a foreign key against the Notice.

Then, when you're displaying the notices you simply use that in your
queries e.g. Notice.objects.filter(user=request.user)

I hope that makes sense.

_M




On 4 July 2013 15:59, Nigel Legg <nigel.l...@gmail.com> wrote:

> Mario, I am not sure what you mean here.  I want users to be able to
> upload data to the site, and do various things with it. I want each user to
> only see the data they have uploaded.  Whether this is
> domain.com/uer_account or user_account.domain.com I don't know, so long
> as it provides the functionality I need. If I use the
> domain,com/user_account, can I do that with the standard django auth system?
>
> Regards,
> Nigel Legg
> 07914 740972
> http://twitter.com/nigellegg
> http://uk.linkedin.com/in/nigellegg
>
>
>
> On 4 July 2013 00:36, Mario Gudelj <mario.gud...@gmail.com> wrote:
>
>> Depends what you need. Do you want to have users access data via
>> www.domain.com/user_acccount/ or http://user_account.domain.com? If it's
>> www.domain.com/user_acccount/ just foreign key your models to user model
>> and in your queries always include user as a filter. The other option is
>> somewhat harder.
>>
>> Cheers,
>>
>> _M
>>
>>
>> On 3 July 2013 22:20, Nigel Legg <nigel.l...@gmail.com> wrote:
>>
>>> I am building an app to, among other things, allow people to upload data
>>> files and carry out various analyses online.  I would like each user to
>>> only see the datafiles that they or members of their team (company,
>>> research team, etc) have uploaded.
>>> It seems that 
>>> django-simple-multitenant<https://github.com/pombredanne/django-simple-multitenant>would
>>>  be appropriate for this.  Are there any problems in using this, or
>>> other apps that would be easier to implement?
>>> Cheers N//
>>>
>>> Regards,
>>> Nigel Legg
>>> 07914 740972
>>> http://twitter.com/nigellegg
>>> http://uk.linkedin.com/in/nigellegg
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to