Re: FetchFromCacheMiddleware.process_request() refactoring proposal

2019-03-18 Thread Alexey Tsivunin
Thanks for your feedback! I'll make a PR in the coming days. I just needed to know does anyone else think this code needs refactoring or I'm doing useless work. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" gr

FetchFromCacheMiddleware.process_request() refactoring proposal

2019-03-18 Thread Alexey Tsivunin
https://github.com/django/django/blob/418263c457636d3301f2068c47f09a0f42e15c52/django/middleware/cache.py#L127 I have an idea how to improve readability of this method. I've already implemented it but before creating an issue and PR I decided to discuss it with community. Maybe all of this doesn

Re: Newcomer's questions

2019-03-17 Thread Alexey Tsivunin
I'm working on issue #29471. This issue have version 2.0. Do I need to add version indicator in that case? if you're fixing a Trac ticket, start the commit message with "Fixed #x > -- bla bla bla". > I still don't understand which of three commits must have that header. First? Or all of the

Newcomer's questions

2019-03-17 Thread Alexey Tsivunin
I worked on issue and fixed a bug. So a have three commits (in the sequence they were commited): - Added regression tests - Added bugfix - Added name to AUTHORS This is my first PR and I have several questions: 1. I don't quite understand about "headers" in commit messages. Which commit should

Re: Django ORM query syntax enhancement

2017-03-31 Thread Alexey Zankevich
Hey all, Please check a draft DEP related to external query language support by Django ORM https://github.com/django/deps/pull/40. Regards, Alexey On Wednesday, March 22, 2017 at 10:07:51 AM UTC+3, Asif Saifuddin wrote: > > Hi Aric, > > I checked your package. it's nice to

Re: Removing aliased imports ("from") in generated migration files to prevent conflicts

2017-01-10 Thread Alexey Kotlyarov
Django doesn't depend on flake8, so it can't be used during migration generation. Otherwise, I think aliasing the conflicting modules (6) is indeed a better way. The problem came about on #django IRC channel because someone named an app "settings", presumably to store some configuration. -- Y

Removing aliased imports ("from") in generated migration files to prevent conflicts

2017-01-09 Thread Alexey Kotlyarov
ided a patch ( https://github.com/django/django/pull/7810), but Tim Graham pointed out that the deficiencies I was pondering too. What is the best way forward here? I have an understanding of what's needed to implement 4 and 2 (won't be much easier than 4) and can change the patch

Re: Django ORM query syntax enhancement

2016-10-12 Thread Alexey Zankevich
i').lower() == 'anssi') It's not a huge difference, but will make it easier to extend. Do you think it's worth to put as DEP? Regards, Alexey On Wed, Oct 12, 2016 at 3:41 PM, Anssi Kääriäinen wrote: > +1 from me, too. > > I still think we should be able to

Re: Django ORM query syntax enhancement

2016-10-06 Thread Alexey Zankevich
ge=(d1, d2)) I think the library is at the final state now and isn't going to get new substantial features, but responses are highly appreciated. Regards, Alexey On Sunday, August 16, 2015 at 4:18:26 PM UTC+3, Alexey Zankevich wrote: > > Hi all, > > This topic is related to the current

Allow validators to short-circuit in form field validation

2016-09-26 Thread Alexey Rogachev
I opened ticket https://code.djangoproject.com/ticket/27263. Do you think the solution I suggested in comment is OK? -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop

Re: Django ORM query syntax enhancement

2015-10-19 Thread Alexey Zankevich
Hey Anssi, Just pushed test_lookup_exclude and test_lookup_exclude2, which passed successfully. Can you please review if they cover exactly described case? Thanks, Alexey On Monday, October 19, 2015 at 2:28:42 PM UTC+3, Anssi Kääriäinen wrote: > > I did similar work in https://gith

Re: Django ORM query syntax enhancement

2015-10-19 Thread Alexey Zankevich
doc as "F Expression". So, I removed FieldExpression wrapper and made F object as real expression. On Monday, October 19, 2015 at 2:09:14 PM UTC+3, Josh Smeaton wrote: > > I think you forgot the PR link Alexey. I'd like to have a look at the > changes you've made.

Re: Django ORM query syntax enhancement

2015-10-19 Thread Alexey Zankevich
test cases (and I'll get them working in case of any issues). Also, there is a workaround field=None -> isnull=True for oracle database, can anybody check if it is working correctly? Regards, Alexey On Thursday, October 1, 2015 at 11:38:39 AM UTC+3, Anssi Kääriäinen wrote: > > Lets

Re: Django ORM query syntax enhancement

2015-10-01 Thread Alexey Zankevich
gle argument transform or a left > and > >> right hand side lookup. > >> > >> In particular, I think your Decode(utf8) example is a good one. It > shows > >> that you could maybe shoehorn multiple arg transforms into the > >> __underscore__ ap

Re: Django ORM query syntax enhancement

2015-09-30 Thread Alexey Zankevich
the > same sense. > > I think data__owner__other_pets__0__name is as nice to read as > JSONExtract('data', path=['owner', 'other_pets', 0, 'name']) personally. > > Marc > On 30 Sep 2015 5:13 pm, "Alexey Zankevich" > w

Re: Django ORM query syntax enhancement

2015-09-30 Thread Alexey Zankevich
ent should not be really required for funcs (the problem doesn't seem to affect transforms as they will not accept multiple params according to another thread). Thanks, Alexey On Wednesday, September 30, 2015 at 9:19:51 AM UTC+3, Anssi Kääriäinen wrote: > > I don't think we n

Re: Django ORM query syntax enhancement

2015-09-29 Thread Alexey Zankevich
x27;user__name', 'Bob') On Sunday, August 16, 2015 at 4:18:26 PM UTC+3, Alexey Zankevich wrote: > > Hi all, > > This topic is related to the current ORM query syntax with underscores. > There are lots of arguing related to it, anyway it has pros and cons. > > Le

Re: Django ORM query syntax enhancement

2015-09-22 Thread Alexey Zankevich
. I'm talking about mentioned earlier syntax: GameSession.objects.filter(GreaterThan('user__profile__last_login_date', > yesterday)) > Could you give me a starter point for that? Thanks, Alexey On Wednesday, August 26, 2015 at 6:04:02 PM UTC+3, Alexey Zankevich wrote: > &

Django SQL templates

2015-08-27 Thread Alexey Zankevich
27; syntax to safely define table/column, otherwise wrapper classes should be engine dependent. I don't suggest a concrete implementation, just wanted to get responses of the concept. Regards, Alexey -- You received this message because you are subscribed to the Google Groups "Django

Re: Django ORM query syntax enhancement

2015-08-26 Thread Alexey Zankevich
>> Contains(F.user.name, "Bob") # conflict Will work on another patch with custom class. On Tuesday, August 25, 2015 at 1:12:56 PM UTC+3, Alexey Zankevich wrote: > > Gotcha. > So, F objects seem to be pretty good as generic interface to specify query > paths, t

Re: Django ORM query syntax enhancement

2015-08-25 Thread Alexey Zankevich
t; metaclasses though. > > For what it's worth, the names `TreePath` and `FieldTree` are too low > level for a public facing API that is supposed to make it easier/safer to > craft field paths. One letter class names are also a bad design in general, > so we'd need something

Re: Django ORM query syntax enhancement

2015-08-24 Thread Alexey Zankevich
ot;P." as a stand-in as you used previously. > > Supporting callables is an interesting idea, and I don't think that'll > cause issues with existing expressions. The callable must return an > expression though. If you wanted to write a patch to support callables, I'd

Re: Django ORM query syntax enhancement

2015-08-20 Thread Alexey Zankevich
ents on the PR will go a long way > to helping me tidy it up sooner rather than later, so please feel free to > review. > > Regards, > > On Wednesday, 19 August 2015 04:55:21 UTC+10, Alexey Zankevich wrote: >> >> Once Josh completes this patch https://github.com/django/d

Re: Django ORM query syntax enhancement

2015-08-18 Thread Alexey Zankevich
ngo. >> >> - Anssi >> >> >> >> On Tue, Aug 18, 2015 at 5:54 PM, Collin Anderson > > wrote: >> > Just a quick thought: I could imagine some newbies could get confused >> by the >> > python-like syntax and try to do: >>

Re: Django ORM query syntax enhancement

2015-08-18 Thread Alexey Zankevich
e better to just let users to format desc ordering themselves? >>> '-{}'.format(path) 2. Don't think it's a big deal, but users might do next thing: >>> path = P.user.last_login_date >>> GameSession.objects.filter(path=today) Traceback (most recent c

Django ORM query syntax enhancement

2015-08-16 Thread Alexey Zankevich
taking into account the library is already done and working. Anyway, I need your thought about the idea in general, as well as about particular things like chosen method names - "get_path", "in_range" and etc. As next step I can create a ticket in the issue tracker,

Re: Django Admin New Look

2015-03-12 Thread Alexey
Thanks you Aymeric On 12 March 2015 at 03:02, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: Now let's try and see if we can merge it :-) > Nice to hear :) But I think there's no rush and we need more testing and more feedback. I'm not sure how people will feel about shipping 32

Django Admin New Look

2015-03-04 Thread Alexey
Hi guys, I think django admin needs new look. I played with styles recently and that's the result: https://github.com/django/django/pull/4232 Inspired by a new djangoproject.com site. New theme looks modern, fresh and clean. There are CSS changes only. No any HTML changes. Let's discuss it. I w

CAS in cache framework

2014-01-17 Thread Alexey Moskvin
Hi all, there is a usefull (for me now :)) CAS operation in memcache: http://neopythonic.blogspot.ru/2011/08/compare-and-set-in-memcache.html, but I can't find it in django cache api. Are there any reasons for it not to be implemented there? Thank you! -- You received this message because you a

Cruft in __getstate__ method of django.db.models.fields.files.FieldFile?

2011-01-20 Thread Alexey Toptygin
ion log on code.djangoproject.com, and I see that closed was made a property in changeset 10737, but it looks like this changeset forgot to remove this key/value pair from __getstate__? Alexey -- You received this message because you are subscribed to the Google Groups "Django dev

FileStorage and folders

2009-08-16 Thread Alexey
Hi. I wonder, why is there no folder creation functions in Storage and FileStorage classes? I ask this not because I don't know how to create it mysef. I'm just curios, why there are only one function for working with folders -- listdir()? As for me, function mkdir() should be there. --~--~-