Re: [Django] #11850: Intermediate model order not applied to related model

2011-12-04 Thread Django
#11850: Intermediate model order not applied to related model
-+-
 Reporter:  pielgrzym|Owner:  bastih
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.1
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  model ordering,  |  Needs documentation:  0
  many to many, through  |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by SmileyChris):

 (Oops, that was me closing)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11850: Intermediate model order not applied to related model

2011-12-04 Thread Django
#11850: Intermediate model order not applied to related model
-+-
 Reporter:  pielgrzym|Owner:  bastih
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.1
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  model ordering,  |  Needs documentation:  0
  many to many, through  |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by anonymous):

 * status:  assigned => closed
 * resolution:   => wontfix


Comment:

 Given the description example, the sets ordering will be based on
 `Person`'s `Meta` ordering. Changing this to use the intermediary table's
 ordering would be backwards incompatible.

 We discussed in IRC having an `ordering=(...)` parameter for the m2m
 field, but that should live in a new ticket.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11850: Intermediate model order not applied to related model

2011-11-29 Thread Django
#11850: Intermediate model order not applied to related model
-+-
 Reporter:  pielgrzym|Owner:  bastih
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  1.1
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  model ordering,  |  Needs documentation:  0
  many to many, through  |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by FunkyBob):

 * cc: FunkyBob (added)
 * keywords:  model orderin, many to many => model ordering, many to many,
 through
 * ui_ux:   => 0
 * easy:   => 0


Comment:

 It would be nice if the Many-to-Many field were ordered by the through
 model's odering [if set].  Comment 4 above only gets you the intermediate
 model, whereas I want to get a set of models at the other end of the M2M.
 I would formulate a patch to do this, but the ORM code is deep magic to me
 -- I wouldn't know where to start :)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11850: Intermediate model order not applied to related model

2010-11-24 Thread Django
#11850: Intermediate model order not applied to related model
---+
  Reporter:  pielgrzym | Owner:  bastih 

Status:  assigned  | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  1.1

Resolution:|  Keywords:  model 
orderin, many to many
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Comment (by phretor):

 It looks like that

 {{{
 >>> beatles.membership_set.all()
 }}}

 is correctly ordered. Not intuitive, but at least you don't have to write
 the ordering criterion twice.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11850: Intermediate model order not applied to related model

2009-12-12 Thread Django
#11850: Intermediate model order not applied to related model
---+
  Reporter:  pielgrzym | Owner:  bastih 

Status:  assigned  | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  1.1

Resolution:|  Keywords:  model 
orderin, many to many
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Comment (by zigarn):

 Same for me

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #11850: Intermediate model order not applied to related model

2009-12-01 Thread Django
#11850: Intermediate model order not applied to related model
---+
  Reporter:  pielgrzym | Owner:  bastih 

Status:  assigned  | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  1.1

Resolution:|  Keywords:  model 
orderin, many to many
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by bastih):

  * owner:  nobody => bastih
  * status:  new => assigned

Comment:

 Stumbled over the same behaviour.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #11850: Intermediate model order not applied to related model

2009-12-01 Thread Django
#11850: Intermediate model order not applied to related model
---+
  Reporter:  pielgrzym | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  1.1

Resolution:|  Keywords:  model 
orderin, many to many
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by bastih):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




[Django] #11850: Intermediate model order not applied to related model

2009-09-08 Thread Django
#11850: Intermediate model order not applied to related model
--+-
 Reporter:  pielgrzym |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:  model orderin, many to many   |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Hi,

 Here is a slightly modified example from django m2m with intermediate
 model docs (note the meta class with order in Membership model):


 {{{
 class Person(models.Model):
 name = models.CharField(max_length=128)

 def __unicode__(self):
 return self.name

 class Group(models.Model):
 name = models.CharField(max_length=128)
 members = models.ManyToManyField(Person, through='Membership')

 def __unicode__(self):
 return self.name

 class Membership(models.Model):
 person = models.ForeignKey(Person)
 group = models.ForeignKey(Group)
 date_joined = models.DateField()
 invite_reason = models.CharField(max_length=64)
 class Meta:
 ordering = ('date_joined')
 }}}


 Now if we try to access the group members (as in django docs):

 {{{
 >>> beatles.members.all()
 [, ]
 }}}

 '''They are sorted with order of Person model, not intermediate model. You
 have to manually assign order_by to achieve the desired effect:'''

 {{{
 >>> beatles.members.all().order_by('membership__date_joined')
 }}}

 It would be nice to be able to specify the intermediate order as default
 order for ManyRelatedManager.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---