assigning to model properties for mocking

2008-10-21 Thread Calvin Spealman
I'm trying to build a test suite in my project and I'm making heavy use of mocks to write them cleanly. Testing has reached a point where I need to mock the fkey property of a model instance, but I'd really like to use this as a mock. Of course, I can't assign the mock here because it isn't an ins

Re: Proposal: Decouple messages from contrib.auth

2008-10-21 Thread Carl Meyer
> I think that auth messages are the wrong way to do it most of the time > they are used (including django core code) anyway. They are usually > used to inform that an action worked (or didn't) -- this should be > done as session messages, not user messages. +1 to this, and also to decoupling mes

token.contents.split() vs. token.split_contents()

2008-10-21 Thread Jacek Fedorynski
Hi, I noticed that some of the default tags use token.split_contents() to parse their arguments, while others use token.contents.split(). At first glance, it seems that split_contents() is the smarter way to go, because it knows about quoted strings. Alas, there's a problem with filters. For exam

Re: Security Trimming or Roles?

2008-10-21 Thread killer barney
I think I posted this on the wrong forum. I"m going to post it on the other forum, sorry about that! On Oct 20, 11:06 pm, killer barney <[EMAIL PROTECTED]> wrote: > Loving django 1.0! > > But one thing I notice they don't seem to have is security trimming > (where you can hide certain links based

Security Trimming or Roles?

2008-10-21 Thread killer barney
Loving django 1.0! But one thing I notice they don't seem to have is security trimming (where you can hide certain links based on the role permissions of a user) or any sort of roles security. Is there any solid way at going about this that already exists in the django framework or is this somet

"OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-21 Thread mrts
It seems that current DB lock management doesn't play nice with the new Python 2.6 multiprocessing package and SQLite. See [1]. The same error also popped up in Google search under mod_python [2]. I wasn't able to reproduce this with MySQL. [1] http://code.djangoproject.com/ticket/9409 [2] http

Re: Proposal: Decouple messages from contrib.auth

2008-10-21 Thread SmileyChris
I think that auth messages are the wrong way to do it most of the time they are used (including django core code) anyway. They are usually used to inform that an action worked (or didn't) -- this should be done as session messages, not user messages. --~--~-~--~~~---~--

Proposal: Signal after model of app was loaded

2008-10-21 Thread Thomas Guettler
Hi, what do you think about a signal which fires after the models of an application where loaded? Use case: Load static (never changing objects) from the database and make them available at module or class level. In my case I want to load some permissions and make them available as Permission i