mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Delete obsolete code
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from reversion.admin import VersionAdmin
|
||||
from assets import models as assets
|
||||
|
||||
|
||||
@@ -15,13 +16,13 @@ class AssetStatusAdmin(admin.ModelAdmin):
|
||||
|
||||
|
||||
@admin.register(assets.Supplier)
|
||||
class SupplierAdmin(admin.ModelAdmin):
|
||||
class SupplierAdmin(VersionAdmin):
|
||||
list_display = ['id', 'name']
|
||||
ordering = ['id']
|
||||
|
||||
|
||||
@admin.register(assets.Asset)
|
||||
class AssetAdmin(admin.ModelAdmin):
|
||||
class AssetAdmin(VersionAdmin):
|
||||
list_display = ['id', 'asset_id', 'description', 'category', 'status']
|
||||
list_filter = ['is_cable', 'category']
|
||||
search_fields = ['id', 'asset_id', 'description']
|
||||
|
||||
17
assets/migrations/0012_remove_asset_next_sched_maint.py
Normal file
17
assets/migrations/0012_remove_asset_next_sched_maint.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.0.3 on 2020-03-18 00:24
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('assets', '0011_auto_20200317_2006'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='asset',
|
||||
name='next_sched_maint',
|
||||
),
|
||||
]
|
||||
@@ -89,7 +89,6 @@ class Asset(models.Model, RevisionMixin):
|
||||
purchase_price = models.DecimalField(blank=True, null=True, decimal_places=2, max_digits=10)
|
||||
salvage_value = models.DecimalField(blank=True, null=True, decimal_places=2, max_digits=10)
|
||||
comments = models.TextField(blank=True)
|
||||
next_sched_maint = models.DateField(blank=True, null=True)
|
||||
|
||||
# Cable assets
|
||||
is_cable = models.BooleanField(default=False)
|
||||
|
||||
Reference in New Issue
Block a user