RE: Equality check for two QuerySet

2022-05-10 Thread Danilov Maxim
I am not Agree. qs1.all() it is copy from qs1, the new object. I already try to write QuerySet compare on the Django 1.4 and i remember, that str(qs1.query) can be different as str(qs2.query), I am not Shure. Mit freundlichen Grüßen, DI Mag. Maxim Danilov +43(681)207 447 76

RE: Idea: Add .checked(/) to QuerySet as alternative to .filter() w/ .first()

2022-06-24 Thread Danilov Maxim
I am completely agree with Jörg. Simply Mixin with own get_or_none help solve you, @Dave Gaeddert your asks. Here we have Other big issue, which always omitted between Django developers in GET method: Multiple objects exception without Already received objects. Get made "len", len created on

RE: More user friendly delete confirmation template

2022-08-16 Thread Danilov Maxim
Hi Jacob. On the one side - you can override this delete_confirmation.html and delete_selected_confirmation.html I do it since dj 1.4 On the other side I am agree with Jacob - it can be in Django by default. – We can add “collapsed” div to wrap with every objects list, or we can add detail

RE: More user friendly delete confirmation template

2022-08-16 Thread Danilov Maxim
for all people. Collapsing the list of to-be-deleted objects could also lead to cases of accidental removal of related objects. I think it's better to err on the side of overwhelming than hiding information. On Tue, Aug 16, 2022 at 1:22 PM Danilov Maxim mailto:ma

RE: Make timeout property for PasswordResetTokenGenerator

2022-08-22 Thread Danilov Maxim
Hi Alexander. You can simply override ‘check_token’ to avoide this harcoded settings.PASSWORD_RESET_TIMEOUT on the 57 line. And for yours task it can be with super call and after add additional check. It is only some additional lines: MyСlassFromPasswordResetTokenGenerator(…):

RE: Permissions don't get translated in admin interface

2022-09-24 Thread Danilov Maxim
Hi, Tribaud. In your case you can override Permission admin to show translated names of permissions and for widgets you can override modelchoiceiterator The name of permission you can translate like model.verbose_name + gettext( ‘can’) + gettext(view/change/delete) and it should be translate

RE: Model-level validation

2022-09-30 Thread Danilov Maxim
I am completely agree with Jörg. We use Model.full_clean And Model.validate_unique to check conditional constraints. It was more than enough. I've not seen any case - where I need something else. Mit freundlichen Grüßen, DI Mag. Maxim Danilov +43(681)207 447 76 ma...@wpsoft.at