An idea for Q filter objects

2016-03-28 Thread Michael E
I don't know if this is possible, but I think it would highly useful if it were. Basically, I want to filter a DateField as though it were a string (see the StackOverflow post to understand why) I

GSoC: Aggregation

2008-06-23 Thread Nicolas E. Lara G.
Hello, Here are some updates on what's going on with aggregate support and some questions. The latest addition to aggregates is the possibility to aggregate on a set that already have annotations. This has been discussed before in [1] and [2]. So far it is implemented in a way that you can obtai

Aggregation status

2008-06-15 Thread Nicolas E. Lara G.
Hello, Here's a little report on the status of aggregation support: New --- * ordering by aggregated values * support in mysql to group by pk instead of all the fields whenever possible * I added a patch in #3566 with the latest implementation of aggregates so it would be easier to test

Aggregation Updates

2008-05-31 Thread Nicolas E. Lara G.
Hello, Today I've commited what could be called the first working version of aggregate support. For those of you not keeping track of the project, it can be found at: http://code.google.com/p/django-aggregation/ Some words on the status of the project. Working * Currently both ann

Re: On aggregates

2008-05-24 Thread Nicolas E. Lara G.
Hi Russell, I have been adding your test cases to the test suit and ran into troubles with some of them so I would like to know a bit more on what you were expecting from the queries: > * Does Author X have any friends? > (aggregate on a related object) > Author.objects.filter(pk=1).aggregate(Co

Re: extra() and values()

2008-05-15 Thread Nicolas E. Lara G.
> 'price / pages'}).get(pk=1). > Still you could do: Book.objects.all().extra(select={'price_per_page' > : 'price / pages'}).values('price_per_page').get(pk=1) and actually > get the value of 'price_per_page' in the dictionary. > I was

On aggregates

2008-05-08 Thread Nicolas E. Lara G.
For those that are interested the aggregation project is hosted in http://code.google.com/p/django-aggregation/ The code is basically an up to date copy of trunk patched with the aggregation support and the relevant tests and doc. Currently there is support for both aggregate and annotate on the

Re: Aggregate Support to the ORM

2008-05-01 Thread Nicolas E. Lara G.
Hello, I've been looking into the different use cases for aggregation and came across one that I wasn't very sure what should be the expected behaviour (regardless of the syntax used to express it) If we do something like: Buyer.objects.all().annotate('purchases__quantity__sum', 'age__max') or

Re: Aggregate Support to the ORM

2008-04-28 Thread Nicolas E. Lara G.
Hi Justin, > I really like Honza's idea of an AggregateModel, at least for cases where > there's a 1-1 correspondence between results and actual instances, so that > the model will still behave as expected. To keep from cluttering the model's > attributes, aggregate values could be put into anoth

Re: Aggregate Support to the ORM

2008-04-22 Thread Nicolas E. Lara G.
'alias'... > Specifically, will there be some way to create new aggregate > predicates just as the builtin sum, avg, etc ? When the I get the basic functionality on wheels I'll check of a way to do this in a cross-database manner. Thanks =) Regards, > Regards > Rajeev J

Re: Aggregate Support to the ORM

2008-04-22 Thread Nicolas E. Lara G.
On Apr 22, 4:36 pm, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > Hi. > > this is very exciting! I've one suggestion/question though. > > On Tue, 2008-04-22 at 13:24 -0700, Nicolas E. Lara G. wrote: > > > with the possibility of using non-keyword arguments

[GSoC] Aggregate Support to the ORM

2008-04-22 Thread Nicolas E. Lara G.
- Grouping should be done internally. There should be no syntax for directely asking the database to use GROUP BY. How to group should be derived from the object representation of what needs to be retrieved. When necessary to specify the fields to be included in the agreg

Re: Customizable QuerySets

2008-03-28 Thread Nicolas E. Lara G.
The idea of adding custom methods to QuerySets seem interesting but I think that subclasing a core part of the framework is quite messy and will require for the developers to know/understand the inner workings of the framework (and there goes abstraction). With this approach you would end up, if I

Re: {% url %} for generic views (proposal)

2007-03-30 Thread Nicolas E. Lara G.
dd and, if they include those contrib apps in their project, they can disambiguate them . Its not a critique of your proposal, I propose the same thing, its an extension. Nicolas On Mar 30, 12:27 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-03-30 at 04:15 +,

Re: {% url %} for generic views (proposal)

2007-03-29 Thread Nicolas E. Lara G.
Other than using uncommon names for the url one could just use the most obvious name and let the url tag have a disambiguation function so if the name is: "name" you could write both: {% url 'name' %} and {% url 'myapp.name' %} (or "myapp/name" or "myapp-name") With this you could keep the url m

Re: {% url %} for generic views (proposal)

2007-03-27 Thread Nicolas E. Lara G.
Hello, I have a proposal for solving this problem on http://hagen.ac.labf.usb.ve/nicolas/gsoc/url-objects/. Maybe you'll like it. Personally I dislike the idea of having a different method for reversing generic views. I believe that the same method should be use for any view. But I like the labeli

My 3 finished gsoc proposals

2007-03-25 Thread Nicolas E. Lara G.
I promise I wont write about this again! I just wanted to let you know I have finished my 3 Django-related Google summer of code proposals. And that they are listed in http://hagen.ac.labf.usb.ve/nicolas/gsoc/ for anyone to take a look or comment. I hope you like them, --~--~-~--~~

Re: URL objects (A google summer of code proposal)

2007-03-20 Thread Nicolas E. Lara G.
anx On 19 mar, 01:26, "Nicolas E. Lara G." <[EMAIL PROTECTED]> wrote: > Hello, > I've created a site to hold my google summer of code proposals. So far > I have a Django proposal and I would like to get feedback from the > community. It's a shame that google

URL objects (A google summer of code proposal)

2007-03-18 Thread Nicolas E. Lara G.
Hello, I've created a site to hold my google summer of code proposals. So far I have a Django proposal and I would like to get feedback from the community. It's a shame that google doesn't let you change your proposal but I'll make any improvements in this page and hope the lead developers will se

Re: Upcoming changes to the Django admin

2007-03-15 Thread Nicolas E. Lara G.
Hello, I'm planning on submitting a google summer of code project related to the admin for rich media support that includes integrating filebrowser and tinyMCE, deleting multiple items at once, friendly large files support, etc. As the admin is being re-designed/written right now I was wondering i

Re: If there was massive security hole found in Django, are there plans in place to deal with it?

2006-08-10 Thread e
Hi, Hopefully this is not out-of-line in this thread. I am a Rails person, not a Django person, although I have written a lot of Python in the past. I can give you some more information about the fallout in the rails community which might help you formulate your policy. I agree with Simon, excep

Re: Moving auth and core models to contrib -- and dependencies

2005-12-20 Thread Jeffrey E. Forcier
of the app. For example, this would go in django/contrib/admin/__init__.py: __dependencies__ = ('django.contrib.auth',) (This assumes auth gets moved to django.contrib.auth rather than being special-cased in django/models.) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com