life is crap
This commit is contained in:
parent
7215da1d81
commit
b07cddaf3b
3 changed files with 37 additions and 6 deletions
|
@ -34,15 +34,11 @@ class IdFormset(forms.models.BaseInlineFormSet):
|
|||
class EquipmentRevisionExtraInline(admin.TabularInline):
|
||||
model = EquipmentRevision
|
||||
extra = 0
|
||||
form = IdForm
|
||||
formset = IdFormset
|
||||
|
||||
|
||||
class EquipmentRemarkExtraInline(admin.TabularInline):
|
||||
model = EquipmentRemark
|
||||
extra = 0
|
||||
form = IdForm
|
||||
formset = IdFormset
|
||||
|
||||
|
||||
class EquipmentAdmin(admin.ModelAdmin):
|
||||
|
|
35
equipment/migrations/0002_auto_20180806_1403.py
Normal file
35
equipment/migrations/0002_auto_20180806_1403.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.11 on 2018-08-06 14:03
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('equipment', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='equipmentremark',
|
||||
name='ids',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='equipmentrevision',
|
||||
name='ids',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='equipmentremark',
|
||||
name='ide',
|
||||
field=models.PositiveSmallIntegerField(default=0, verbose_name='id'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='equipmentrevision',
|
||||
name='ide',
|
||||
field=models.PositiveSmallIntegerField(default=0, verbose_name='id'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -61,7 +61,7 @@ class EquipmentRemark(models.Model):
|
|||
related_name="remarks",
|
||||
help_text=_("Matériel concerné par la remarque"),
|
||||
)
|
||||
ids = IdField()
|
||||
ide = models.PositiveSmallIntegerField(_("id"))
|
||||
is_broken = models.BooleanField()
|
||||
is_lost = models.BooleanField()
|
||||
|
||||
|
@ -85,7 +85,7 @@ class EquipmentRevision(models.Model):
|
|||
help_text=_("Matériel concerné par les révisions"),
|
||||
)
|
||||
remark = models.TextField(_("remarque sur la révision"))
|
||||
ids = IdField()
|
||||
ide = models.PositiveSmallIntegerField(_("id"))
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("révision de matériel")
|
||||
|
|
Loading…
Reference in a new issue