Re: Grouping commands by app in ./manage.py help

2011-07-10 Thread George Karpenkov
#x27;m not quite sure how ./manage.py help --list would help -- if someone is parsing the list, they'll have to change their script anyway. On Jul 10, 9:13 pm, Russell Keith-Magee wrote: > On Sunday, July 10, 2011, George Karpenkov wrote: > > Hi everyone, > > Recently I&#x

Grouping commands by app in ./manage.py help

2011-07-10 Thread George Karpenkov
Hi everyone, Recently I'm becoming more and more annoyed with ./manage.py help behavior -- in projects with many dependencies it's virtually impossible to find the command you need as there are just too many, and searching for the one you need takes ages (and ages and ages). So I thought that

Re: Vote on {% include %} behaviour.

2011-06-23 Thread George Karpenkov
I would personally prefer to be able to specify whether the "include" should be rendered at the compile time or at the rendering time. For some applications it is really useful to have recursive inclusion of templates, which is impossible with compile-time inclusion. For example, a few days ago I

Re: ./manage.py loaddata calls .save() on all models... should it?

2011-03-30 Thread George Karpenkov
. Any updated comments on disabling the signal handling for the loaddata operation? On Mar 30, 5:30 pm, Russell Keith-Magee wrote: > On Wed, Mar 30, 2011 at 2:21 PM, George Karpenkov > > wrote: > > If we'll look into core/management/commands/loaddata we'll see the > &

Re: ./manage.py loaddata calls .save() on all models... should it?

2011-03-29 Thread George Karpenkov
Oh okay, apparently there is a ticket from 4 years ago http://code.djangoproject.com/ticket/4459 On Mar 30, 5:21 pm, George Karpenkov wrote: > If we'll look into core/management/commands/loaddata we'll see the > line > "obj.save(using=using)" which saves the data. &g

./manage.py loaddata calls .save() on all models... should it?

2011-03-29 Thread George Karpenkov
If we'll look into core/management/commands/loaddata we'll see the line "obj.save(using=using)" which saves the data. *however* consider the case when application has some custom database- altering logic in .save method. The common thing that comes to mind is timestamp, or something similar. What

Re: contrib/admin/validation.py

2010-09-02 Thread George Karpenkov
Would you accept the patch that would simply allow functions as well as iterables? On Sep 1, 10:35 pm, Russell Keith-Magee wrote: > On Wed, Sep 1, 2010 at 6:41 PM, Gregor Müllegger wrote: > > I ran into the same problem as George before. And it always hits when I try > > to > > modify my admin

Re: Inline template rendering in admin shouldn't silence errors

2010-09-02 Thread George Karpenkov
Dear Russ, I still don't quite get why "runtime template errors are unacceptable". My understanding is that if user has DEBUG=True, and TEMPLATE_DEBUG=True, then clearly (at least to me) the user does want to see all of the errors. DEBUG flags should be off in the production environment, right? A

Re: Inline template rendering in admin shouldn't silence errors

2010-09-01 Thread George Karpenkov
deal with that. On Sep 1, 10:44 pm, Russell Keith-Magee wrote: > On Wed, Sep 1, 2010 at 2:03 PM, George Karpenkov > > wrote: > > Steps to reproduce: > > 1) Specify a custom admin class (say A) which mentions a custom inline > > with a custom template, say "a.htm

contrib/admin/validation.py

2010-08-31 Thread George Karpenkov
There is a file called "validation.py" which attempts to do validation checking for the admin. Though I realize it might be useful for the beginners (as a basic sanity check) quite often I find it standing in my way and being annoying. The reasons are: 1) Python does not have interfaces. It relies

Inline template rendering in admin shouldn't silence errors

2010-08-31 Thread George Karpenkov
Steps to reproduce: 1) Specify a custom admin class (say A) which mentions a custom inline with a custom template, say "a.html" 2) Write anything to "a.html" which will raise TemplateSyntaxError - ie "{% extends "a.html" %} 3) Observe the change_form for A. Note that you do not see any errors, but

Conflicting javascript libraries in django admin and different applications

2010-06-23 Thread George Karpenkov
The problem of including javascript files/libraries was discussed quite a few times on this mailing list. (the problems start to appear when two or more reusable apps are used on the same page and both of them reference same javascript libraries, thus conflicting with each other ) The overall cons

Re: Proposal - ChoiceField.choices need to accept callable, not only list or tuple

2010-03-24 Thread George Karpenkov
oh wait, you're right. (though choices=my_func seems to be neater then choices=(c for c in my_func()) (for some reason i thought that choices=(c for c in my_func()) will evaluate the my_func before we'll iterate through choices, but it won't) On Mar 24, 5:48 pm, Ivan Sagalaev

Re: Proposal - ChoiceField.choices need to accept callable, not only list or tuple

2010-03-23 Thread George Karpenkov
ator expression but a) the first call to it will be done before the class instantiation b) it can be way more convenient to pass a function then a generator expression (generator expression can be very hard to code if it has to contain some complex logic) On Mar 24, 11:20 am, Ivan Sagalaev

Re: Proposal - hook to modify links in object-tools

2010-03-22 Thread George Karpenkov
once again, I'm happy to write a patch if people think it's a good idea On Mar 11, 5:21 pm, George Karpenkov wrote: > Currently to add a link to object-tools one has to modify a template. > > I think that in most cases it would be much easier to do that through > python - i

Re: Proposal - ChoiceField.choices need to accept callable, not only list or tuple

2010-03-22 Thread George Karpenkov
http://code.djangoproject.com/ticket/13181 On Mar 23, 4:42 pm, Jared Forsyth wrote: > I say go for it, and post again with a patch and issue number (once you've > created them). Your idea seems sound. > > Jared > > On Mon, Mar 22, 2010 at 11:30 PM, George Karpenko

Proposal - ChoiceField.choices need to accept callable, not only list or tuple

2010-03-22 Thread George Karpenkov
Hi, The subject pretty much describes all of it. If 'initial' can be a callable, why 'choices' can't? Writing custom function is way more convenient then altering __init__ method of the model. I'm happy to write up a patch if it would be likely to be accepted -- You received this message becaus

Proposal - hook to modify links in object-tools

2010-03-10 Thread George Karpenkov
Currently to add a link to object-tools one has to modify a template. I think that in most cases it would be much easier to do that through python - if admin actions have a mechanism for removing existing ones/ adding new ones why object-tools does not? Sometimes it's impossible to modify an admi

Re: Proposal - admin actions with no elements selected

2010-03-01 Thread George Karpenkov
747a5a127 with a message of yours. If that's counter intuitive, what is the preferred way to include such actions? On Mar 1, 5:26 pm, Alex Gaynor wrote: > On Mon, Mar 1, 2010 at 12:23 AM, George Karpenkov > > > > > > wrote: > > Hi there, > > > Currently

Proposal - admin actions with no elements selected

2010-02-28 Thread George Karpenkov
Hi there, Currently, if no elements are selected, any action selected in the admin interface will not fire. However, sometimes it is useful to create actions which do not require any elements to be selected - ie x removing all elements x drag-n-drop reordering of all elements x arranging element

Re: admin javacripts

2010-02-22 Thread George Karpenkov
> I like the option (2). wouldn't it mean that jquery library can potentially get downloaded/ parsed many times, which will slow down the page rendering? On Feb 22, 7:49 pm, Ales Zoulek wrote: > I like the option (2). > > Could some of you provide a patch for the ticket in the proposed fashion?

Re: admin javacripts

2010-02-18 Thread George Karpenkov
On Feb 19, 1:39 am, Rob Hudson wrote: > I've battled many of these same issues when working on the debug > toolbar... it needs to work the same in any environment it gets loaded > into and, as such, has slightly different requirements put on it.  It > is seeming the admin is heading the same direc

Re: admin javacripts

2010-02-18 Thread George Karpenkov
+ it will make changing the jquery version much easier, since the person can just overwrite the base.html template On Feb 19, 3:39 pm, George Karpenkov wrote: > This is quite similar to the bug I've described > inhttp://code.djangoproject.com/ticket/12879. > > There is one thin

Re: admin javacripts

2010-02-18 Thread George Karpenkov
This is quite similar to the bug I've described in http://code.djangoproject.com/ticket/12879 . There is one thing that definitely needs to be done - Media definition needs to store javascripts as an ordered set to prevent duplicate inclusions rather then a list. I think adding jquery.js to the b