Hello,
I have question about type of design patterns using in Django ORM. It
is: Table Data Gateway, Row Data Gateway, Active Record or Data
Mapper? .. Personally I think that it's mix of Row Data Gateway and
Data Mapper, but I want to ask You guys for sure :-)
Thanks, regards,
P.R.
--
You
Per my patches and what I believe Malcom has done with qsrf, the
syntax for related fields was field__related__name, and yes, you would
repeat this over and over, but it keeps it consistant.
I would like a values-like method to return partial objects, and then
requesting any field thats not
On 15 Feb, 12:30, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> When Adrian
> proposed that API, he realised that almost always you're going to be
> pulling back all of the fields or almost all of them. Once a database
> has read a row to access some of the data, accessing all of the data in
>
On Fri, 15 Feb 2008 21:30:23 +1100
Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> There's also the fairly pragmatic side-effect that if you are only
> pulling back a very few fields, there isn't really a lot your model
> methods are going to be able to do without loading more data, unless
>
On Fri, 15 Feb 2008 01:54:24 -0800 (PST)
Dima Dogadaylo <[EMAIL PROTECTED]> wrote:
> > Of course, this decreases database load, but IMHO it is better to
> > use QuerySet.values if you want select just certain values from a
> > model.
>
> Often I need methods defined in models and isn't available
On Fri, 2008-02-15 at 01:54 -0800, Dima Dogadaylo wrote:
> On 14 Feb, 17:26, Sebastian Noack <[EMAIL PROTECTED]>
> wrote:
> >
> > Of course, this decreases database load, but IMHO it is better to use
> > QuerySet.values if you want select just certain values from a model.
>
> Often I need
On 14 Feb, 17:26, Sebastian Noack <[EMAIL PROTECTED]>
wrote:
>
> Of course, this decreases database load, but IMHO it is better to use
> QuerySet.values if you want select just certain values from a model.
Often I need methods defined in models and isn't available at
dictionaries.
For example
> I made a patch for Django to add QuerySet.fields(*fields,
> **related_fields) and make possible to load only some from master and
> related models fields. It allows to tune various object list queries
> when we need only limited subset of all fields, improve general
> performance and decrease
On Thu, 2008-02-14 at 03:50 -0800, Entropy Hacker wrote:
> I made a patch for Django to add QuerySet.fields(*fields,
> **related_fields) and make possible to load only some from master and
> related models fields. It allows to tune various object list queries
> when we need only limited subset
I made a patch for Django to add QuerySet.fields(*fields,
**related_fields) and make possible to load only some from master and
related models fields. It allows to tune various object list queries
when we need only limited subset of all fields, improve general
performance and decrease database
On 11/22/07, Goutham DL <[EMAIL PROTECTED]> wrote:
> Iam new to this community. I would like to know more about the django
> ORM(i.e its internal workings). Can someone provide some good links
> for this?
http://code.djangoproject.com/wiki/DevModelCreation
--
"Bu
I have downloaded the source code and gone through the official
documentation :).Iam more interested in how django does the mapping
from the code to SQL.
Goutham
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Nov 23, 8:18 am, Goutham DL <[EMAIL PROTECTED]> wrote:
> Hi,
> Iam new to this community. I would like to know more about the django
> ORM(i.e its internal workings). Can someone provide some good links
> for this?
Hi Goutham,
If you're new to the community, ensu
Hi,
Iam new to this community. I would like to know more about the django
ORM(i.e its internal workings). Can someone provide some good links
for this?
Goutham
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
> Could this be related to #2874 ?
2874 looks related in that it is another bug resulting from a similar
type of circular table relationship.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers"
On 2/28/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> [...]
>
> But! I did find the root of what's causing this bug and it may occur
> regardless of the name of the model...
>
> Our content system has these relationships:
>
> Content -> ContentType
> Content -> Attribute -> ContentType
>
On Feb 9, 3:12 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> So after some back and forth about whether this should or shouldn't
> work, there didn't seem to be any resolution. Your gut feeling looks
> right to me Rob: it should probably work as you expect (no collision),
> although it
On Wed, 2007-01-31 at 17:41 -0800, Rob Hudson wrote:
> > Keep in mind that django.contrib.contenttypes gets installed by
> > default, and is used by the comments app, the auth app, the admin app
> > and the generic relations framework.
> >
> > It's hard to escape it :)
>
> I quickly grepped the
Greetings,
I'd like to ask, why Django ORM has no concept of Identity Map? It is
strange for me that if I call get() five times I will get five object
instances, instead of five references to a single instance.
Was it a design decision? I'm unable to find any discussions of this.
Or I'm
Rob Hudson wrote:
>> Django has a builtin type called "ContentType",
>> http://code.djangoproject.com/browser/django/trunk/django/contrib/con...
>>
>> I'd just rename yours to something else and be done with it.
>
> As a workaround, sure. I've already worked around the issue.
>
> But I don't
On 1/31/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> > Django has a builtin type called "ContentType",
> > http://code.djangoproject.com/browser/django/trunk/django/contrib/con...
> >
> > I'd just rename yours to something else and be done with it.
>
> As a workaround, sure. I've already worked
> Django has a builtin type called "ContentType",
> http://code.djangoproject.com/browser/django/trunk/django/contrib/con...
>
> I'd just rename yours to something else and be done with it.
As a workaround, sure. I've already worked around the issue.
But I don't think Django would want this
On 1/30/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> I'm getting a weird bug here and this is what I've deduced...
>
> I've got a "Page" model and a "Content" model. Content has a FK to
> Page. I also have a "ContentType" model and Content has a FK to
> ContentType. This is where I tell it if
I'm getting a weird bug here and this is what I've deduced...
I've got a "Page" model and a "Content" model. Content has a FK to
Page. I also have a "ContentType" model and Content has a FK to
ContentType. This is where I tell it if the content is text or other
media content.
The problem
http://simon.net.nz/articles/django-database-export-v1/ is nice :)
I was refering to something more than ju a way to make dumps - a
dumper which has an admin page where I could select what to dump and
other options.
--~--~-~--~~~---~--~~
You received this
On 1/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
My proposal is a database data dumper based on django ORM - It would
not produce SQL but python code that would insert the data. Something
like (example dump):
You might want to check out the phase 3 patches associated with
I half-wrote something similar (1) to extract some data for an app.
It's very preliminary - you'll need to hand-edit the ordering of
relationships etc, but you can get a list of the various api
save/create commands which will recreate the data.
Hope it helps,
Simon
[1]
On 1/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
My proposal is a database data dumper based on django ORM - It would
not produce SQL but python code that would insert the data. Something
like (example dump):
###
from os import environ
environ['DJANGO_SETTINGS_
My proposal is a database data dumper based on django ORM - It would
not produce SQL but python code that would insert the data. Something
like (example dump):
###
from os import environ
environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.contrib.auth.models import User
John Lenton wrote:
>
> I hadn't even considered having a multi-parameter tuple-returning
> "sum"; I was ok with either calling groupby thrice, or saving the
> groupby and calling the different ops in sequence. In either case, a
> database roundtrip per call.
I'm often grouping thousands of rows
Russell Keith-Magee wrote:
> annotate() returns a query set, so it can be used multiple times, be
> combined with filters, etc. The argument handling strategy employed in
> filter() is reused here; kwargs to annotate() can be decomposed on a
> __ boundary to describe table joins, with the last
On 12/4/06, DavidA <[EMAIL PROTECTED]> wrote:
>
> Would I have to call queryset.groupby(account) three times: once for
> count(), once for sum(quantity) and once for sum(total_pnl)?
I hadn't even considered having a multi-parameter tuple-returning
"sum"; I was ok with either calling groupby
On 12/4/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> I'm taking this to django-dev for more discussion; it'll get seen by more the
> right people there.
>
> Thoughts, anyone?
Ok; here's my thoughts.
1. Introduction
~~~
Consider the following pseudo-model:
class Book(Model):
On 12/4/06 3:30 PM, DavidA wrote:
> I think it quickly gets more complicated than that syntax would
> support.
Oh, of *course* it does -- that's why I want to discuss it more!
I think, though, that we should be able to find a 80/20 point for aggregates
and support most of the common use
Jacob Kaplan-Moss wrote:
> No, I think not -- I think that syntax (``queryset.groupby(field).max()``)
> actually looks like the best proposal for aggregates I've seen thus far...
>
> Thoughts, anyone?
>
> Jacob
I think it quickly gets more complicated than that syntax would
support. For
On 12/4/06 5:57 AM, John Lenton wrote:
> The "max", "min" and other such functions might be a little more
> problematic, unless groupby returned, rather than a generic iterator,
> a special "queryset group" and give _it_ the max/min/etc methods. This
> way it would be clear that max() returns a
101 - 136 of 136 matches
Mail list logo