Re: Advanced Permissions and States

2008-12-22 Thread Paul van der Linden
Hi, I'm working on a big project at my work myself. We came to this problem last week (we did something to check it, but it was unmanagable). We wanted to move the check to the models. This is a little bit difficult because you basicly doesn't have the user object at in the __init__ function of yo

Re: Advanced Permissions and States

2008-12-22 Thread Paul van der Linden
makka...@gmail.com wrote: >> I'm working on a big project at my work myself. >> We came to this problem last week (we did something to check it, but it >> was unmanagable). >> We wanted to move the check to the models. This is a little bit >> difficult because you basicly doesn't have the user obj

Re: a clean_tarfile() for my form

2008-12-23 Thread Paul van der Linden
Hi, look at the module reference at python documentation: http://www.python.org/doc/2.5.2/lib/module-tarfile.html You can see there an is_tarfile to check if it is a tar file, or you can use TarFileCompat to check if it is a tar_gzipped file. Alan wrote: > Hi There, > > So I have a form where user

Re: Model with 2 foreignkey to User

2008-12-24 Thread Paul van der Linden
Hi, just do as the error is telling you. created_by = models.ForeignKey(User, related_name='createdBy') assigned_to = models.ForeignKey(User, related_name='assignedBy') or something like that. That works. Tirta K. Untario wrote: > Hi all, > > I'm developing a simple todo list. I use Dj