FWIW this seems like something that would go hand in hand with
portions of #13

On Apr 16, 12:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 16, 2008 at 9:41 AM, Julien <[EMAIL PROTECTED]> wrote:
> > Thanks Karen for the clarification! That code looked dead to me too...
> > is that worth filing a ticket?
>
> I'd say its worth removing dead code to avoid confusion, but that's just my
> opinion.  The core devs may feel it's not worth worrying about.  If you open
> a ticket worst case it gets closed wontfix, but even then someone who comes
> along later and has the same question might think to search the tracker and
> find that someone else came to the same conclusion.
>
> It seemed interesting to me because I was looking for some kind of
>
> > mechanism that would make it easy to define "orderable" objects. For
> > example, elements of a list, or children of a tree branch, ordered by
> > an arbitrary integer value. I have implemented that mechanism once,
> > but I found it very tedious to maintain. To me it seems like a generic
> > behaviour so I was hoping Django would offer something out of the
> > box :)
>
> > Is there anything in Django that helps with that? If not, I have found
> > that code [1], which looks like a good start. What do you think?
>
> I don't know of anything built-in that will help here, so I'd give what you
> found a try.  I've never had a need for this myself so I can't say I've
> given a lot of thought to the best way to approach it.
>
> Karen
>
>
>
> > Thanks!
>
> > Julien
>
> > [http://blog.vicox.net/2008/03/10/orderingfield-for-django/]
>
> > On Apr 15, 11:23 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> > > On Tue, Apr 15, 2008 at 12:50 AM, Julien <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I've stumbled on OrderingField in django.db.models.fields.
>
> > > > That looks very interesting to me but I could not find any example of
> > > > use, either in Django itself or on the web.
>
> > > > Do you know what it is, and how to use it?
>
> > > No, but from looking around in the SVN history you can find that the
> > code
> > > was added on the magic-removal branch in a changeset (1780) with the
> > > comment:
>
> > > steps towards ordering in edit-inline and spreadsheetish editing in
> > > changelists using ManipulatorCollections
>
> > > ManipulatorCollection never made it to trunk, it was removed from the
> > > magic-removal branch in changeset 2103 with the comment:
>
> > > Restored manipulators to code from trunk, removing the unfinished stuff
>
> > > So, whatever OrderingField was supposed to be used for, it doesn't seem
> > to
> > > have ever been finished.  The code looks to be dead.
>
> > > Why does it look interesting to you?  Perhaps there is an actually
> > > implemented mechanism to do whatever you thought OrderingField might do,
> > if
> > > you explain what you thought it might be useful for.
>
> > > Karen
>
> > > > Thanks a lot!
>
> > > > Julien
>
> > > > PS: Here's its code:
>
> > > > class OrderingField(IntegerField):
> > > >    empty_strings_allowed=False
> > > >    def __init__(self, with_respect_to, **kwargs):
> > > >        self.wrt = with_respect_to
> > > >        kwargs['null'] = True
> > > >        IntegerField.__init__(self, **kwargs )
>
> > > >    def get_manipulator_fields(self, opts, manipulator, change,
> > > > name_prefix='', rel=False, follow=True):
> > > >        return [oldforms.HiddenField(name_prefix + self.name)]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to