Re: Annotate date intervals or ranges

2016-03-07 Thread Josh Smeaton
FYI I'm implementing date_trunc based transforms in this patch: https://github.com/django/django/pull/6243 Since the transform names "__month" "__year" etc are already taken by the Extract based transforms I've not yet implemented a lookup_name so that they can be used on the left hand side of

Re: TransactionManagementError is raised when autocommit …

2016-03-07 Thread Tore Lundqvist
Hi, Aymeric Thanks for your extensive reply. I'm sorry that I just throw in that comment about timed out connections without enough information for you to actually respond to it. an example of when it happens is when: Starting with auto commit on. transaction.set_autocommit(False) ... a lot of

Re: [Feature Request] Orderable ArrayAgg and StringAgg in contrib.postgres.aggregates

2016-03-07 Thread Tim Graham
Ticket for JSON_AGG: https://code.djangoproject.com/ticket/26327 On Thursday, January 7, 2016 at 5:45:03 PM UTC-5, Josh Smeaton wrote: > > Seems reasonable enough to me. Expressions already support generating an > ORDER BY clause by calling .asc() or .desc() on them. That'd allow your > proposed

Re: TransactionManagementError is raised when autocommit …

2016-03-07 Thread Tore Lundqvist
Hi, Shai As far as I know your not allowed to do a transaction.rollback() in an atomic block so I don't seen how this is different from doing a transaction.commit() Den måndag 7 mars 2016 kl. 08:23:09 UTC+1 skrev Shai Berger: > > Hi Tore, > > You should be able to get what you want be replaci

Re: [Question] jsi18n - get_javascript_catalog a bit obscure?

2016-03-07 Thread Tim Graham
For posterity, ticket is https://code.djangoproject.com/ticket/26328. On Friday, March 4, 2016 at 4:54:06 PM UTC-5, Tim Graham wrote: > > Please read https://code.djangoproject.com/ > > On Friday, March 4, 2016 at 4:47:39 PM UTC-5, Cristiano Coelho wrote: >> >> Where do I get an account for Trac t

Re: Problems with cache.get_or_set behaviour

2016-03-07 Thread Tim Graham
A solution is proposed in https://code.djangoproject.com/ticket/26332. It looks reasonable to me. Feel free to give your feedback there. On Sunday, February 28, 2016 at 5:26:50 PM UTC-5, Raphael Michel wrote: > > Hi, > > I just experienced the following behaviour and would like to ask for > you

Re: Should tutorial start with minimal Django?

2016-03-07 Thread Tim Graham
I think it could be useful to document that you can use Django with such a minimal setup. My preference wouldn't be to put it in the tutorial but maybe it has a place in docs/topics/overview.txt or similar. On Tuesday, March 1, 2016 at 8:07:38 PM UTC-5, Curtis Maloney wrote: > > When we were tea

Re: Override the default form field for a model field

2016-03-07 Thread Tim Graham
One idea (and it could be a terrible one) after a few minutes of thinking about it is an API similar to the query lookup/tranform API where you could write something like: from django.db import models models.CharField.register_formfield(MyCustomFormField) which would make all subsequent CharFie

Re: Add support for relative imports in django.conf.urls.include()?

2016-03-07 Thread Tim Graham
How common are "heavily nested apps"? Is there anyone else reading this who would find this useful? On Thursday, March 3, 2016 at 3:40:14 AM UTC-5, lamby wrote: > > This just made me realize that the whole problem can already be fixed from >> the user's perspective by importing the module instea

Re: Translate permission Django

2016-03-07 Thread Tim Graham
This has been discussed in several tickets (https://www.google.com/search?&q=translate+permissions+site%3Acode.djangoproject.com) and mailing list threads (search the archives of this list for "translate permissions"). As far as I can tell, there's no clear solution at this time. On Monday, Fe

Summer of Code Idea: Class-based [Object] Permissions

2016-03-07 Thread Connor Boyle
As I understand, some parts of Django-Rest-Framework are being considered for integration into Django (please correct me if I'm mistaken). I'm not sure what specifically core plans to bring in, but in my opinion the feature that core Django needs the most

Re: context = context.new(context)

2016-03-07 Thread Tim Graham
I guess this should go to django-users (usage questions). It's not clear to me how this is related to the development of Django itself. To increase the likelihood of getting an answer, make the code example more complete and find the commit in Django where the behavior changed. I can't answer th

Re: Admin hstore widget

2016-03-07 Thread Tim Graham
1. Merging something minimal always help to get feature requests. :-) 2. Could you be more specific about what you're looking for? All the existing documentation for style related stuff is at https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/. I also though

Re: Spatial lookups for RasterField

2016-03-07 Thread Tim Graham
The index approach seems consistent with ArrayField's index transforms [0] so that seems okay to me. [0] https://docs.djangoproject.com/en/1.9/ref/contrib/postgres/fields/#index-transforms On Thursday, January 28, 2016 at 10:33:54 AM UTC-5, Daniel Wiesmann wrote: > > Hello Everyone > > I have b

Re: URL dispatching framework: feedback requested

2016-03-07 Thread Tim Graham
Hi Marten, How are things going? Do you plan to make a push to merge this for 1.10? The alpha is scheduled for May 16. Are you still waiting for feedback? I think writing documentation would certainly facilitate that. Also, if there's any chance to break the existing commit into some smaller lo

Re: Adding "bits of entropy" argument to crypto.get_random_string

2016-03-07 Thread Nick Timkovich
By the presence of a "bits" measure in the documentation of the function it seems to be known that it's a measure of interest. The benefit of adding it into Django is that by review of others it can be assured to be correct and will reduce the likelihood of security-related bugs. A bit contrived

Re: remove old SVN branches from git repository?

2016-03-07 Thread Tim Graham
I see these branches are documented: https://docs.djangoproject.com/en/dev/internals/git/#feature-development-branches. In reading that I saw the mention about a grafts file. I don't entirely understand what that does but when I was reading about it, I saw "As of Git 1.6.5, the more flexible g

Re: Adding "bits of entropy" argument to crypto.get_random_string

2016-03-07 Thread Tim Graham
My opinion is that django.utils needn't grow features that Django itself doesn't use. On Monday, March 7, 2016 at 11:04:48 AM UTC-5, Nick Timkovich wrote: > > By the presence of a "bits" measure in the documentation of the function > it seems to be known that it's a measure of interest. The bene

Re: Is there a reason these features cannot be added inside Django core?

2016-03-07 Thread Tim Graham
1. This has been raised before, but it seems there's not much interest. See also: https://groups.google.com/d/topic/django-developers/jsMlF6u4yxU/discussion 2. Here's a tentatively accepted ticket for editing OneToOne related models as inlines: https://code.djangoproject.com/ticket/21135 For f

Re: Override the default form field for a model field

2016-03-07 Thread James Pic
Thanks Tim. Something like that would work, perhaps the first step would be to make modelfield.formfield a bit more configurable ? Currently, the default form field class for a model field is hardcoded in the model field's formfield() method, ie: https://github.com/django/django/blob/master/django

Re: Admin hstore widget

2016-03-07 Thread Curtis Maloney
On 08/03/16 02:43, Tim Graham wrote: 1. Merging something minimal always help to get feature requests. :-) 2. Could you be more specific about what you're looking for? All the existing documentation for style related stuff is at https://docs.djangoproject.com/en/dev/internals/contributing/

Re: Improving MSSQL and Azure SQL support on Django

2016-03-07 Thread Meet Bhagdev
Hi all, On interacting with several Django developers and committers, one of the questions often came up, can I use SQL Server on non Window OS's? I wanted to share that today Microsoft announced SQL Server availibility on Linux - https://blogs.microsoft.com/blog/2016/03/07/announcing-sql-serve

Re: Admin hstore widget

2016-03-07 Thread Josh Smeaton
I wouldn't drop it if I were you. I (think) I watched you demo the hstore admin field at melbdjango and it looked cool to me. If I used hstorefield I'd be interested in the implementation. The dev ML isn't really indicative of the broader django community I feel, because only a small portion of

Re: Improving MSSQL and Azure SQL support on Django

2016-03-07 Thread Josh Smeaton
Wow, that's really great news! I haven't used mssql for a number of years but it was always very nice to work with. Having it available to run on linux will make it much easier for the Django community to test against mssql, provided we're able to get/develop an appropriate driver and backend.