Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
Ŧ Groups Home
Proposal: ordering edit-inlines with order_with_respect_to (admin-interface)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
patrickk  
View profile  
 More options Oct 22 2008, 12:06 pm
From: patrickk <patr...@vonautomatisch.at>
Date: Wed, 22 Oct 2008 09:06:43 -0700 (PDT)
Local: Wed, Oct 22 2008 12:06 pm
Subject: Proposal: ordering edit-inlines with order_with_respect_to (admin-interface)
IMHO, when using "order_with_respect_to", one should be able to order
the inlines (stacked & tabular).

whatīs necessary:
1. can_order should be set to true when using "order_with_respect_to".
e.g., if you currently subclass a formset and use can_order=true, there
īs an error in the admin-interface (key "ORDER" not found).
2. ordered_forms should be available independently from is_valid() -
even if thereīs an error somewhere in your form, the ordering should
be retained.

note: this proposal is not about integrating some drag/drop-
functionality within the templates (using javascript). although that
would be nice, itīs just about having the _possibility_ to reorder
stuff.

thanks,
patrick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
patrickk  
View profile  
 More options Oct 24 2008, 1:58 am
From: patrickk <patr...@vonautomatisch.at>
Date: Thu, 23 Oct 2008 22:58:44 -0700 (PDT)
Local: Fri, Oct 24 2008 1:58 am
Subject: Re: Proposal: ordering edit-inlines with order_with_respect_to (admin-interface)
if someome points me to the right direction, I might be able to
provide a patch for this issue. yesterday, I tried to sketch the
relations between the different formset-classes, -methods and -
helpers, but (to be honest) Iīm a bit lost here.

furthermore, itībe interesting if the dev-team wants this to be solved
or if this behaviour is intentional (for whatever reason).

thanks,
patrick

On 22 Okt., 18:06, patrickk <patr...@vonautomatisch.at> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob Kaplan-Moss  
View profile  
 More options Oct 28 2008, 11:31 am
From: "Jacob Kaplan-Moss" <jacob.kaplanm...@gmail.com>
Date: Tue, 28 Oct 2008 09:31:27 -0600
Local: Tues, Oct 28 2008 11:31 am
Subject: Re: Proposal: ordering edit-inlines with order_with_respect_to (admin-interface)

On Wed, Oct 22, 2008 at 10:06 AM, patrickk <patr...@vonautomatisch.at> wrote:
> IMHO, when using "order_with_respect_to", one should be able to order
> the inlines (stacked & tabular).

Yup, this has been on the todo list for quite some time. We even
discussed it at PyCon a couple years ago as we kicked off
newforms-admin. A few things that I recall from that discussion:

* We decided that we'd like to remove ``order_with_respect_to`` —
particularly the way it adds a magical ``_order`` field — in favor of
an explicit ``OrderingField``.

* This would work with related objects::

    class Poll(Model):
        ...

    class Choice(Model):
        poll = ForeignKey(Poll, related_name="choices")
        order = OrderingField(with_respect_to="poll")

* This would give you an API that provided things like
``poll.choices.in_order()`` and ``poll.choices.set_order()``.

* ``OrderingField``s would also work without a related object::

    class Person(Model):
        order = OrderingField()

* That'd allow APIs like ``Person.objects.in_order()`` and
``Person.objects.set_order()``.

I can't recall more of this discussion, but perhaps this'll be enough
to get you (or someone) started?

Jacob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
patrickk  
View profile  
 More options Oct 29 2008, 4:54 am
From: patrickk <patr...@vonautomatisch.at>
Date: Wed, 29 Oct 2008 01:54:54 -0700 (PDT)
Local: Wed, Oct 29 2008 4:54 am
Subject: Re: Proposal: ordering edit-inlines with order_with_respect_to (admin-interface)
thanks, jacob.
doing the OrderingField doesnīt seem too much or a problem (and I do
like the idea of getting rid of order_with_respect_to).

where Iīm really struggeling is the admin-interface:
letīs say I have changed the order of my inline-related forms, Iīve
made an error (e.g. a required field is not given somewhere within the
whole form) and then I click "submit".
of course, the inline-related forms should be displayed in the new
order - but that order is not saved yet. so, Iīm not quite sure how
this OrderingField has to be connected with the admin-functionality.
the only solution I can think of right now is reordering the inline-
related forms via javascript onload. but thatīs already possible and
doesnīt require an OrderingField.
it gets even more complicated when thinking of empty extra forms,
ordered between forms with an "original". these empty forms should be
removed from the list (in case of an error) from my point of view.

any ideas on how to reorder inline-related forms in case of an error? I
īd definitely prefer a non-javascript-solution ...

thanks,
patrick

On 28 Okt., 16:31, "Jacob Kaplan-Moss" <jacob.kaplanm...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »