Thanks for the feedback and ideas. There are tons of these unfortunately so 
exposing the order fields wouldn't really work for me. Christian, to expose 
the _order field you should be able to edit admin.py and include the _order 
field in your inline, making it show up in your admin form (I didn't test 
this though). I went the data migration 
<https://docs.djangoproject.com/en/1.8/topics/migrations/#data-migrations> 
route. In case it's helpful to anyone else here is the data migration I 
used.


# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    def _order_update(apps, schema_editor):
        order = 0
        faq = apps.get_model("shop", "ProductFaq")
        for faqinline in faq.objects.all():
            order += 1
            faqinline._order = order
            faqinline.save()     

    dependencies = [
        ('shop', '0013_auto_20151013_0937'),
    ]

    operations = [
        migrations.RunPython(_order_update),
    ]

You would need to change the model name etc as necessary of course.


On Tuesday, October 13, 2015 at 11:07:39 PM UTC-6, Christian Hoffmann wrote:
>
> Hello,
> How to enable direct access to the _order field in the admin? 
> Thanks a lot...
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to