> I fully agree with you. This is generaly not a very good
> design, but i think we can do some exception for a very
> specific problems. For example, i found this very handy, when
> we have to support a multilingual db: getting the current
> language like this and use it to select the right value
On Jan 17, 2008 5:36 AM, Grindizer <[EMAIL PROTECTED]> wrote:
> For example, i found this very handy, when we have to support a
> multilingual db: getting the current language like this and use it to
> select the right values in db can save us a lot of work, and result in
> a more clear views code
I fully agree with you. This is generaly not a very good design, but i
think we can do some exception for a very specific problems.
For example, i found this very handy, when we have to support a
multilingual db: getting the current language like this and use it to
select the right values in db ca
On Jan 17, 2008 5:00 AM, Grindizer <[EMAIL PROTECTED]> wrote:
> - If you want to retrieve the current logged user at model level, this
> is a little more complicated, because models are note designed to see
> what happen at process level, but it still possible, look at this:
Any code which requir
- If you want retrieve all Person objects that can be viewed by a
user, this is possible with this query:
persons = Person.objects.filter( Q(owner=my_user) | Q(public=True) )
my_user is the current logged user, so this query, in designed to be
executed in a view function.
- If you want to retri
5 matches
Mail list logo