Ticket #15860: modelform.is_valid() and modelform.errors fail to anticipate database integrity errors, allows exceptions to reach the user

2011-04-19 Thread legutierr
I hope it's OK to copy the body of the ticket here, even if it is redundant, in order to spur discussion. I'm willing to work on a patch if there is a consensus as to the proper solution... modelform.is_valid() fails to anticipate database integrity errors when those errors involve any fields tha

Re: proposal Meta.exclude in Form

2011-04-19 Thread Xavier Ordoquy
Le 20 avr. 2011 à 05:57, Constantine a écrit : > FormModel have exclude attribute in Meta, but simple Form doesnt: > example usage: > > i need base form for editing with many fields, and derived form for > object creation with subset of fields and so i want to exclude > unnecessary fields Actua

Re: proposal Meta.exclude in Form

2011-04-19 Thread Constantine
generally it's lack of Meta subclass in simple form, in which we can configure fields order, exclusion of some fields etc. Now i should override __init__ method, its not so declarative way as in modelform -- You received this message because you are subscribed to the Google Groups "Django develo

proposal Meta.exclude in Form

2011-04-19 Thread Constantine
FormModel have exclude attribute in Meta, but simple Form doesnt: example usage: i need base form for editing with many fields, and derived form for object creation with subset of fields and so i want to exclude unnecessary fields -- You received this message because you are subscribed to the Go

Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-19 Thread Paul McMillan
Ah, this does sound like a pretty nasty issue with our code then. Unfortunately, the test suite doesn't get run as often as it should with the various cache backends enabled, and I imagine that may be how this cropped up. There have been a number of similar bugs in the past - caching is hard! I'd a

Re: RFC: new backports policy

2011-04-19 Thread Carl Meyer
On 04/19/2011 05:24 PM, Luke Plant wrote: > Another issue with regards to backporting bug fixes that Jacob didn't > mention is the fact that bug fixes often introduce subtle regressions > and backwards incompatibilities. > > Personally, I find that backporting a fix very often takes only a > minut

Re: RFC: new backports policy

2011-04-19 Thread Luke Plant
Another issue with regards to backporting bug fixes that Jacob didn't mention is the fact that bug fixes often introduce subtle regressions and backwards incompatibilities. Personally, I find that backporting a fix very often takes only a minute, by appropriate use of DVCS features (e.g. hg transp

Re: RFC: new backports policy

2011-04-19 Thread Ivan Sagalaev
On 04/19/2011 02:35 PM, Daniel Moisset wrote: I'm using 1.3 in production and there's a bugfix I really want, so I do the backport (and write the code, tests, docs). If I submit this to the issue tracker, is there a chance my patch will get into the next minor release, or you won't even consider

Re: RFC: new backports policy

2011-04-19 Thread Daniel Moisset
On Tue, Apr 19, 2011 at 4:22 PM, Jacob Kaplan-Moss wrote: > Hi folks -- > > > The core team has come to a rough consensus and we're planning to drop > this backport-everything policy. Instead, we'll only backport critical > patches. That is, we'd only backport patches for: > > * Security issues. >

Re: RFC: new backports policy

2011-04-19 Thread Yishai Beeri
Perhaps augment the new policy by stating that contributed backports for bugs that are left out by this change will be favorably looked upon, and committed to the branch unless there is a good reason no to commit them. This still achieves the goal of making the routine bugfix commit cycle fas

Re: RFC: new backports policy

2011-04-19 Thread Aymeric Augustin
On 19 avr. 2011, at 21:22, Jacob Kaplan-Moss wrote: > We'd like to make this change effective immediately, but we also don't > want to just issue this change by fiat. So we're requesting comments > and feedback on this change. Do you like the idea? Why or why not? > Will this policy make it more l

Re: RFC: new backports policy

2011-04-19 Thread Tobias McNulty
On Tue, Apr 19, 2011 at 3:22 PM, Jacob Kaplan-Moss wrote: > Hi folks -- > > Over the past few weeks, the core development team have been > discussing how we can streamline our process to get more work done > quicker. It's pretty clear that the bulk of the community wishes > Django could move forwa

RFC: new backports policy

2011-04-19 Thread Jacob Kaplan-Moss
Hi folks -- Over the past few weeks, the core development team have been discussing how we can streamline our process to get more work done quicker. It's pretty clear that the bulk of the community wishes Django could move forward a bit faster [1], and we'd like to be able to deliver more awesomen

Re: Admin DateTimeShortcuts performance (feature request / improvement suggestion)

2011-04-19 Thread Fabian Büchler
Just wanted to point you to the ticket I've opened for this topic: http://code.djangoproject.com/ticket/15231 Since the patch is in for two months now, I thought it was ok to kindly ask if someone was willing to do a review on this. Happy about every review and improvement suggestion! Thanks and

Re: Right way to do formfield-less fields?

2011-04-19 Thread Carl Meyer
On 04/19/2011 09:44 AM, Jonas H. wrote: > On 04/10/2011 03:14 PM, Jonas H. wrote: >> What's the preferred way to do a custom model field that has no >> corresponding formfield? Intuitively, I'd say raise a >> NotImplementedError, but that would make the whole model unusable in the >> admin even i

Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-19 Thread Raphael Kubo da Costa
Paul McMillan writes: > Yes, SimpleCookie is known to be an unpickleable class. We shouldn't > be directly pickling it anywhere in Django. In your code, you should > probably turn the cookie into a string before caching it. I'm not > clear if the bug you're experiencing is happening in Django's c

Re: Right way to do formfield-less fields?

2011-04-19 Thread Jonas H.
On 04/10/2011 03:14 PM, Jonas H. wrote: Hello! What's the preferred way to do a custom model field that has no corresponding formfield? Intuitively, I'd say raise a NotImplementedError, but that would make the whole model unusable in the admin even if that field is excluded from being displayed.

Re: Fixing makemessages for Javascript

2011-04-19 Thread Jonathan Slenders
Hi Lukasz, It does not yet generate .po files. While I haven't yet had any plans for doing this, it's not really complex at all to make this possible through the preprocessor. What is currently does, is parsing and processing templates and external css/js files. It does a lot of optimizations in

Re: Fixing makemessages for Javascript

2011-04-19 Thread Łukasz Rekucki
On 19 April 2011 15:35, Jonathan Slenders wrote: > > Basically, when this works, the i18n catalog for javascript is no > longer required, even for external files. > https://github.com/citylive/django-template-preprocessor > Could you elaborate on that ? How does your application help me handle cl

Re: Fixing makemessages for Javascript

2011-04-19 Thread Jonathan Slenders
A related question. How should we thread escape characters when the msgid is generated? Is the escaping backslash assumed to be part of the translation? And is this behaviour consistent between Babel and the current parser? gettext("xy\"zzy 3"); In my opinion, we should completely unescape t

Re: #14891, a.k.a. "related managers don't work how we claim they do"

2011-04-19 Thread Johannes Dollinger
Am 19.04.2011 um 00:03 schrieb Carl Meyer: > Hi Johannes, > > On 04/18/2011 01:45 PM, Johannes Dollinger wrote: >> Deprecate `use_for_related_fields` and always use the default manager >> for related managers. Then add the possibility to specify custom >> mangers for individual relations: >> >>