Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-22 Thread [EMAIL PROTECTED]
Waylan, while discussing this with Clint, I came to the conclusion that we will still face this problem with this solution. However, IMO, that is indicative of an upstream problem and should be reported up stream, once it is fixed there this solution will continue to work correctly for both

Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-22 Thread Waylan Limberg
On Wed, Oct 22, 2008 at 7:16 PM, Clint Ecker <[EMAIL PROTECTED]> wrote: > > Hi all, > I've opened a ticket on this matter (http://code.djangoproject.com/ > ticket/9427) but the gist of it is this: > [snip] > > I'm throwing this out there just to get a wider eye on the patch just > in case there

admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-22 Thread Clint Ecker
Hi all, I've opened a ticket on this matter (http://code.djangoproject.com/ ticket/9427) but the gist of it is this: I have a django application that is packaged as an egg. Inside this package are many files which include an admin.py. It would appear that the rest of django finds the files

Proposal: ordering edit-inlines with order_with_respect_to (admin-interface)

2008-10-22 Thread patrickk
IMHO, when using "order_with_respect_to", one should be able to order the inlines (stacked & tabular). what´s necessary: 1. can_order should be set to true when using "order_with_respect_to". e.g., if you currently subclass a formset and use can_order=true, there ´s an error in the

Re: Proposal: Signal after model of app was loaded

2008-10-22 Thread Thomas Guettler
Hi Malcolm and others, your solution would solve my problem. I drop this proposal. Malcolm Tredinnick schrieb: > On Tue, 2008-10-21 at 13:07 +0200, Thomas Guettler wrote: > >> Hi, >> >> what do you think about a signal which fires after the models >> of an application where loaded? >>

Re: Proposal: Improvements for django.forms

2008-10-22 Thread Giuliani Vito Ivan
On Wed, Oct 22, 2008 at 07:17:56PM +1100, Malcolm Tredinnick wrote: > > I think it would be nice if you could call > > mark_safe on the label attribute of a form field so it doesn't get > > escaped in _html_output. Currently if you want to put html in labels, > > it seems that you have to copy

Re: Proposal: Signal after model of app was loaded

2008-10-22 Thread Tai Lee
I'd love to see this feature implemented. I was previously (mistakenly) using `management.py` in my app folders for this, thinking that it was imported when any management command was executed (such as `runfcgi`, `runserver`, `shell`, etc). Unfortunately it's only imported when `syncdb` is

Re: Proposal: Improvements for django.forms

2008-10-22 Thread Giuliani Vito Ivan
On Wed, Oct 22, 2008 at 07:17:56PM +1100, Malcolm Tredinnick wrote: > On Sat, 2008-10-18 at 12:48 -0700, Jesse Young wrote: > > I think it would be nice if you could call > > mark_safe on the label attribute of a form field so it doesn't get > > escaped in _html_output. Currently if you want to

Re: Proposal: Improvements for django.forms

2008-10-22 Thread Malcolm Tredinnick
On Sat, 2008-10-18 at 12:48 -0700, Jesse Young wrote: > > 3. Meta attribute formfield_kwargs for model forms > > It seems like the arguments to form fields can already be customized > fairly easily using formfield_callback? In your example, I think you > could accomplish the same thing using

Re: assigning to model properties for mocking

2008-10-22 Thread Malcolm Tredinnick
On Tue, 2008-10-21 at 18:55 -0700, Calvin Spealman wrote: > 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

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

2008-10-22 Thread Malcolm Tredinnick
On Tue, 2008-10-21 at 05:22 -0700, Jacek Fedorynski wrote: > 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

Re: Proposal: Signal after model of app was loaded

2008-10-22 Thread Malcolm Tredinnick
On Tue, 2008-10-21 at 13:07 +0200, Thomas Guettler wrote: > Hi, > > what do you think about a signal which fires after the models > of an application where loaded? Probably not necessary. > > Use case: > > Load static (never changing objects) from the database and make them > available > at

Re: Proposal: Improvements for django.forms

2008-10-22 Thread Malcolm Tredinnick
I don't have particularly strong feelings about this, with the exception of a few things noted below... On Thu, 2008-10-16 at 20:09 -0700, pm13 wrote: > I would like to propose five quite isolated improvements for > django.forms. But I think it is better to write about them in one > email -

Re: Unique CharField greater than 256 characters on MySQL Fails - what is the correct solution

2008-10-22 Thread Malcolm Tredinnick
On Fri, 2008-10-17 at 06:25 -0700, adamiis111 wrote: > Malcom, > > Thanks for the well-explained response. It's a bit more complicated > than that though as this is only an issue if the field uses a UNIQUE > index. It is an issue up through the latest and greatest stable MySQL > (tested on