Re: Re The sprint

2007-09-11 Thread Ben Ford
Thanks for the responses guys. Russ what is your feeling about getting multi-db into the repo so that people can then use it? I'm happy to do the work that I mentioned above in merging the branch up to date to the point of the backend refactor in trunk, and after that to start exploring re-factorin

Boulder, CO Sprinters

2007-09-11 Thread Peter Baumgartner
If any of you keep an eye on this list, give me a shout. I may be on the Front Range this weekend and would like to participate. -- Pete --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To

Re: newforms: custom error messages

2007-09-11 Thread Malcolm Tredinnick
On Wed, 2007-09-12 at 03:34 +, SmileyChris wrote: [...] > PS: I'm no internationalization expert, but ugettext_lazy wasn't in > __all__ of django.utils.translation.__init__ so I had to add it in to > use it. I'm not overlooking something, am I? Well, you are and you aren't. You don't need to

permission_required sends user to login, even if already logged in

2007-09-11 Thread Todd O'Bryan
Does anyone else wish that there were a setting for a PERMISSION_DENIED page that the permission_required decorator could send users who are already logged in to, rather than sending them to the login page? I'd still like users who aren't logged in to be sent to the login page. Todd --~--~--

newforms: custom error messages

2007-09-11 Thread SmileyChris
I've added a functional patch to the ticket http://code.djangoproject.com/ticket/3457 if some people want to try it out. Feel free to write some documentation or tests. ;) PS: I'm no internationalization expert, but ugettext_lazy wasn't in __all__ of django.utils.translation.__init__ so I had t

Free Training Course

2007-09-11 Thread Planet Jobs
FREE TRAINING Facilitating multi-stakeholder processes and social learning Training Agriculture in transition: analysis, design and management of sustainable farming Seed potato technology, certfication and supply chains Training Training on Contemporary approaches to plant genetic resources

Re: Many-to-many relationships with additional columns

2007-09-11 Thread Marty Alchin
On 9/11/07, Tai Lee <[EMAIL PROTECTED]> wrote: > This seems to work, but is it missing out on some of the niceties / > helper methods of the proposed M2M? What would be the benefits of the > suggested new method over this? Yes, that method works, and that's the recommended way to go for now, but

Re: Many-to-many relationships with additional columns

2007-09-11 Thread Tai Lee
I think I'd like to see this functionality in trunk, too. Previously when I needed a M2M model with sequence or other data, I just created the M2M model explicitly with ForeignKey fields to the two related models. class Role(models.Model): role = models.CharField(maxlength=255) c

Re: Signals in ManyRelatedManager

2007-09-11 Thread Marty Alchin
I've come up with a considerably different approach to this, which offers more flexibility, and also solves a problem I've had when it comes to ManyToManyField. Basically, instead of dealing with signals, and worrying about pre/post and whether or not you can prevent stuff, I broke out some bits o

Re: proposal: helper functions for validation

2007-09-11 Thread Marty Alchin
On 9/11/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > About validate_exception, this is the signature of the corresponding > method in unittest: > > *assertRaises*( exception, callable, *args, **kw) > they have removed message, but since args and kw will be passed to > callable, these are the on

Re: proposal: helper functions for validation

2007-09-11 Thread Amit Upadhyay
On 9/11/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > That said, I'd also recommend that if you're going to draw any > parallels with unittest assertions, you should probably do it > reliably. Your validate_exception() example was completely unreadable > to me, because it works quite differently t

Re: Add import location of objects to docs?

2007-09-11 Thread Rob Hudson
> However, we're always interested in any way to make the documentation > better, so if you can come up with a way to make this idea work, we > can take a look at it. That's the hard part and was hoping someone would have a bright idea. :) The best idea I've had is to spell out the full path to

Re: proposal: helper functions for validation

2007-09-11 Thread Marty Alchin
I'll chime in just for a few cents here. First, I think it's worth noting that most Python programmers find little value in how many characters they have to type. Sure, Python is generally less verbose than many other languages, but only to the extent of making it more readable. So kep readabilit

Re: Signals in ManyRelatedManager

2007-09-11 Thread Ludovico Magnocavallo
On Sep 11, 1:20 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > > I'm hoping to look into revamping some ManyToMany stuff during the > sprint, so it's possible that something like this might be made easier > after that. Note that the words "hoping", "possible" and "might" all > combine to indicate

Re: per object permissions in admin using newforms-admin

2007-09-11 Thread Yuri Baburov
2007/9/11, andybak <[EMAIL PROTECTED]>: > > Am I right in thinking that the current recommended approach to > restricting admin access to certain objects (or rows) on a user by > user basis is to use the admin hooks in newforms-admin? I've started > using the queryset hook to remove items from the

Re: proposal: helper functions for validation

2007-09-11 Thread Amit Upadhyay
On 9/11/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > Well... no. assertEquals exists in Python unittests because > assertEquals exists in JUnit, and unittest emulates the JUnit API. > This API is, in turn, based on xUnit, which was derived from SUnit, > the original Smalltalk implementati

Re: [Changeset] r6097 - django/trunk/django/http

2007-09-11 Thread Malcolm Tredinnick
On Tue, 2007-09-11 at 22:06 +0800, Russell Keith-Magee wrote: > On 9/11/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > This change caught my eye going past. > > > > Do you think it's a good idea to have foo.has_key('blah') and "'blah' in > > foo" > > behaving differently? Is there som

Re: Refactoring command options

2007-09-11 Thread Todd O'Bryan
The code you removed was trying to catch an error created by using illegal options or arguments in one of the commands. Apparently optparse still prints the usage message, but you also see the Python error. It looks like sys.exit(3) is raising an exception that no one has ever noticed before. Not

Re: [Changeset] r6097 - django/trunk/django/http

2007-09-11 Thread Russell Keith-Magee
On 9/11/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > This change caught my eye going past. > > Do you think it's a good idea to have foo.has_key('blah') and "'blah' in foo" > behaving differently? Is there some reason we can't go the traditional > way and just alias it with has_key = __c

Re: [Changeset] r6097 - django/trunk/django/http

2007-09-11 Thread Malcolm Tredinnick
Russell, On Tue, 2007-09-11 at 08:36 -0500, [EMAIL PROTECTED] wrote: > Author: russellm > Date: 2007-09-11 08:36:09 -0500 (Tue, 11 Sep 2007) > New Revision: 6097 > > Modified: >django/trunk/django/http/__init__.py > Log: > Fixed #5318 -- Added __contains__ method to HttpRequest, mirroring ex

Re: accessing db api from models.py breaks apps/models loading

2007-09-11 Thread Marty Alchin
I'll be looking into this a bit this week, hopefully I can get something nailed down before the sprint. It's rearing its ugly head in one of my projects that really can't afford to have models disappearing from the admin. I'll post more when I know more. -Gul --~--~-~--~~

per object permissions in admin using newforms-admin

2007-09-11 Thread andybak
Am I right in thinking that the current recommended approach to restricting admin access to certain objects (or rows) on a user by user basis is to use the admin hooks in newforms-admin? I've started using the queryset hook to remove items from the changelist page. However I am wondering how the

Re: Re The sprint

2007-09-11 Thread identify
Hi > No problems. If I was too harsh, I apologize. You're not alone in > wanting this feature - if you search the archives, there is a > reasonable number of people that have expressed an interest - however, > this is one of those features that people want, but very few are > willing to help out

Re: Re The sprint

2007-09-11 Thread Rodrigo Moraes
On 9/11/07, Russell Keith-Magee wrote: > No problems. If I was too harsh, I apologize. You're not alone in > wanting this feature - if you search the archives, there is a > reasonable number of people that have expressed an interest - however, > this is one of those features that people want, but

Re: Signals in ManyRelatedManager

2007-09-11 Thread Ludovico Magnocavallo
On Sep 11, 1:20 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > > I'm hoping to look into revamping some ManyToMany stuff during the > sprint, so it's possible that something like this might be made easier > after that. Note that the words "hoping", "possible" and "might" all > combine to indicate

Re: proposal: helper functions for validation

2007-09-11 Thread Russell Keith-Magee
On 9/11/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > On 9/11/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > I'm afraid you're going to have a hard time convincing me that this is > > a good idea. I'm willing to entertain the idea of validation helpers > > if they genuinely add clarity -

Re: Re The sprint

2007-09-11 Thread Russell Keith-Magee
On 9/11/07, identify <[EMAIL PROTECTED]> wrote: > > Hi, > > I think I was slightly misunderstood or my post left a false > intention. My true purpose just was to say, that e.g. I am one of > those who would like to see this as a core feature. I didn't meant to > crack the whip ;-) No problems. If

Re: Signals in ManyRelatedManager

2007-09-11 Thread Marty Alchin
On 9/11/07, Ludovico Magnocavallo <[EMAIL PROTECTED]> wrote: > I really need this feature, could you tell me if it has any chance of > being committed, or if there's a different way of doing the same thing > that I did miss? I'm hoping to look into revamping some ManyToMany stuff during the sprin

Re: Overriding admin forms

2007-09-11 Thread Honza Král
On 9/11/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Mon, 2007-09-10 at 18:25 -0500, Joseph Kocherhans wrote: > > There's a ticket in Trac to override the BaseForm in the admin > > add/change views of the newforms admin branch. [1] It seems to me that > > it would also be useful to over

Re: proposal: helper functions for validation

2007-09-11 Thread Amit Upadhyay
On 9/11/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > I'm afraid you're going to have a hard time convincing me that this is > a good idea. I'm willing to entertain the idea of validation helpers > if they genuinely add clarity - but not if they are just a verbose > replacement for somethi

Re: Re The sprint

2007-09-11 Thread identify
Hi, I think I was slightly misunderstood or my post left a false intention. My true purpose just was to say, that e.g. I am one of those who would like to see this as a core feature. I didn't meant to crack the whip ;-) > It has been considered. It has been accepted. It just hasn't been > implem

Signals in ManyRelatedManager

2007-09-11 Thread Ludovico Magnocavallo
In one of my apps, I have the need to track changes to M2M objects, and run some code when one of them gets added/deleted/cleared. I looked for a way to do this, and could not find any: the M2M Manager is created dynamically, thus I cannot extend its class or use a custom one; and since it can

Re: Re The sprint

2007-09-11 Thread Russell Keith-Magee
On 9/11/07, identify <[EMAIL PROTECTED]> wrote: > > So please: as there is time and place - please do us a favor and > consider this (somewhat really important) feature! It has been considered. It has been accepted. It just hasn't been implemented. For all the noise about how essential this featu

Re: Re The sprint

2007-09-11 Thread identify
I really can't await on having the multi-db-branch as a trunk feature. Honestly: I think this is really a must have feature according to stuff like having high priority data separated from minor priority data (e.g. user/login data as a high priority). It would be a charm on e.g. having it spread o