Hi All, I'm new to Django and I haven't found a way to specify the sequence that classes render on the admin page.
I'm converting a CNC programming engine that allows the operator to specify the parameters then used to create a g-code program for a milling machine. (the client is fabricating glass shower doors) I've attached an example below. A Door consists or four sides, Right, Top, Left and Base. Each side can have cutouts. Further cutouts and holes may be specified. When the model renders, the direct attributes of xSide (length, edge, oos, nudge, etc) display in the same sequence as listed in the class definition. The classes for Right, Top, etc appear in jumbled order. I'd like them to appear in the order listed as well. Is there a way to control that? Thanks, Emile ------ start of models.py ------ from django.db import models class Door(models.Model): OrderLine = models.CharField(maxlength=9,unique=True) class Admin: pass def __str__(self): return self.OrderLine class xSide (models.Model): length= models.CharField(maxlength=9, core=True) edge = models.CharField(maxlength=3, blank=True) oos = models.CharField(maxlength=3, blank=True) nudge = models.CharField(maxlength=6, blank=True) cutout_Code= models.CharField(maxlength=15, blank=True) location1 = models.CharField(maxlength=9, blank=True) location2 = models.CharField(maxlength=9, blank=True) location3 = models.CharField(maxlength=9, blank=True) class Right (xSide): right = models.ForeignKey(Door, edit_inline=models.TABULAR, num_in_admin=1) class Top (xSide): top = models.ForeignKey(Door, edit_inline=models.TABULAR, num_in_admin=1) class Left (xSide): left = models.ForeignKey(Door, edit_inline=models.TABULAR, num_in_admin=1) class Base (xSide): bottom = models.ForeignKey(Door, edit_inline=models.TABULAR, num_in_admin=1) class AdditionalCutout (models.Model): side = models.ForeignKey(Door, edit_inline=models.TABULAR, num_in_admin=4) cutoutCode = models.CharField(maxlength=15, core=True) x1_coord = models.CharField(maxlength=9) y1_coord = models.CharField(maxlength=9) x2_coord = models.CharField(maxlength=9) y2_coord = models.CharField(maxlength=9) x3_coord = models.CharField(maxlength=9) y3_coord = models.CharField(maxlength=9) class Admin: pass -------------------------- end of module ----------------- (NB - for screen space considerations, I modified .../django/forms/__init__.py as follows) # .../django/forms/__init__.py # #class TextField(FormField): # input_type = "text" # def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=None, member_name=None): # if validator_list is None: validator_list = [] # self.field_name = field_name # self.length, self.maxlength = min(length,maxlength), maxlength # ^^^^^^^^^^^^^^^^^^^^^ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---