Init reversion
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from django.db import models
|
||||
|
||||
from reversion import revisions as reversion
|
||||
|
||||
|
||||
class Status(models.Model):
|
||||
name = models.CharField(max_length=80)
|
||||
@@ -23,6 +25,7 @@ class Model(models.Model): # Cause that won't be a confusing name at all
|
||||
return "{} {}".format(self.make.name, self.name)
|
||||
|
||||
|
||||
@reversion.register
|
||||
class Vehicle(models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
# color
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl">All Vehicles</h1>
|
||||
<table class="table-auto border">
|
||||
<h1 class="text-2xl py-3 font-bold">All Vehicles</h1>
|
||||
<table class="table-auto border w-full">
|
||||
<thead>
|
||||
<th class="p-2">Name</th>
|
||||
<th class="p-2">Make & Model</th>
|
||||
@@ -25,7 +25,7 @@
|
||||
<td class="p-2">{{ object.vin_number|default:"Unknown" }}</td>
|
||||
<td class="p-2">{{ object.engine_number|default:"Unknown" }}</td>
|
||||
<td class="p-2">{{ object.chassis_number|default:"Unknown" }}</td>
|
||||
<td class="p-2"><a href="{% url 'vehicle_detail' object.pk %}" class="underline text-blue-100 border rounded p-2 bg-black bg-opacity-10">Detail</a></td>
|
||||
<td class="p-2"><a href="{% url 'vehicle_detail' object.pk %}" class="underline text-blue-100">Detail</a></td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr class="bg-yellow-400">
|
||||
|
||||
Reference in New Issue
Block a user