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

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 <true.chesh...@gmail.com> wrote: > This is quite similar to the bug I've described > inhttp://code.djangoproject.com/

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

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

Re: Proposal - admin actions with no elements selected

2010-03-01 Thread George Karpenkov
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 <alex.gay...@gmail.com> wrote: > On Mon, Mar 1, 2010 at 12:23 AM, George Karpenkov > > > > > > <true.chesh...@gmail.com> wro

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

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

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

2010-03-23 Thread George Karpenkov
http://code.djangoproject.com/ticket/13181 On Mar 23, 4:42 pm, Jared Forsyth <jabap...@gmail.com> 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

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

2010-03-23 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 <true.chesh...@gmail.com> 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 t

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

2010-03-23 Thread George Karpenkov
man...@softwaremaniacs.org> wrote: > George Karpenkov wrote: > >http://code.djangoproject.com/ticket/13181 > > I'm -1 on complicating it this way. The ability to pass a callable for > choices is covered by passing a generator. Am I missing something? -- You received this message because you are

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

2010-03-24 Thread George Karpenkov
man...@softwaremaniacs.org> wrote: > George Karpenkov wrote: > > Given your experience, the chances are that you're right, however, I > > don't see any way how we can pass a generator which will not be called > > until the form class is instantiated. > > Why should a call

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

Inline template rendering in admin shouldn't silence errors

2010-09-01 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

contrib/admin/validation.py

2010-09-01 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

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

2010-09-01 Thread George Karpenkov
with that. On Sep 1, 10:44 pm, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Wed, Sep 1, 2010 at 2:03 PM, George Karpenkov > > <true.chesh...@gmail.com> wrote: > > Steps to reproduce: > > 1) Specify a custom admin class (say A) which mentions a custom inline > &

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?

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

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

2011-03-30 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: ./manage.py loaddata calls .save() on all models... should it?

2011-03-30 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 <true.chesh...@gmail.com> wrote: > If we'll look into core/management/commands/loaddata we'll see the > line > "obj.save(using=using)&q

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

2011-03-30 Thread George Karpenkov
updated comments on disabling the signal handling for the loaddata operation? On Mar 30, 5:30 pm, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Wed, Mar 30, 2011 at 2:21 PM, George Karpenkov > > <true.chesh...@gmail.com> wrote: > > If we'll look into core/manageme

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

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: Grouping commands by app in ./manage.py help

2011-07-10 Thread George Karpenkov
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 <russ...@keith-magee.com> wrote: > On Sunday, July 10, 2011, George Karpenkov <true.chesh...@gmail.com> wrote: