Re: 'Session' object does not support item assignment

2007-06-18 Thread Vertigo
Thanks, Jeremy. Your piece of code works perfectly. I will think about suggestions for the documentation and open a ticket. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

'Session' object does not support item assignment

2007-06-16 Thread Vertigo
Hi, Using the latest SVN revision, I have an issue when manipulating sessions (out of request). The background: My application stores custom user privileges in their sessions (home- cooked version of 'per-object' permissions). When specific conditions are met, I must 'refresh' some user

Re: Summon specific filter on related object from Django template

2007-05-15 Thread Vertigo
Bureaucrat James Bennett, you are technically correct -- the best kind of correct! :-) Thanks for bringing me this new approach. I like it that way. As for guidelines, I tend to follow them even when I do not grasp the good reason behind. Following guidelines would have avoided my department to

Summon specific filter on related object from Django template

2007-05-15 Thread Vertigo
Hi, Here is my problem, summarized by this web page: I would like to display only the public documents of a given project (not the private ones). Class Document has a ForeignKey field on class Project, and a BooleanField (is_public). My condition is: I just pass the Project object to my

Re: Intializing newforms Form objects

2007-03-08 Thread Vertigo
I am struggling right now with the same concerns :-) I have a hand-written form for a model with ManyToMany field. So far, I noted a few things that helped me come to a working solution, but maybe not really elegant... The form initialization with an object looks like this (I hope...): my_form

[newforms] Thoughts about rendering errors below the form field?

2007-03-06 Thread Vertigo
Hi, The default HTML rendering of form errors, with method as_table() at least, is to display them above the form field. Am I the only one concerned with this? :-) I am struggling with CSS tricks to render this correctly, without getting anywhere I must say. I would rather display errors below

How to save a ManyToMany from a (new) form?

2007-03-01 Thread Vertigo
Hello, With this model and form, what is the correct syntax to save a new Room object? from django.contrib.auth.models import User class Room(models.Model): name = models.CharField() users = models.ManyToManyField(User) class