Как представить данные из модели, которая наследуется, на нескольких веб-страницах?
Я делаю форму, разделенную на несколько страниц (как форма мастера), реализовать ее и пересмотреть не получилось, Wizard это не то что мне нужно, поэтому я разделил ее на страницы. Дело в том, что есть 7 шагов и все они сохраняют информацию, на 8 шаге нужно показать данные, которые были сохранены ранее, только они не отображаются. Как мне показать ту информацию, которая уже была сохранена?
views.py
class step7(ListView):
model=Presupuestos
template_name='Presupuestos/new-estimate-7-preview.html'
context_object_name='presupuestos'
queryset=Presupuestos.objects.all()
models.py
class Presupuestos(models.Model):
cliente= models.ForeignKey(Clientes, on_delete=models.SET_NULL, null=True)
carro=models.ForeignKey(Carro, on_delete=models.SET_NULL, null=True)
mano_obra=models.ForeignKey(ManoObra, on_delete=models.SET_NULL, null=True)
parte=models.ForeignKey(Parte, on_delete=models.SET_NULL, null=True)
garantia=models.CharField(max_length=255,default=0)
pago = models.ForeignKey(Pagos, on_delete=models.SET_NULL, null=True)
foto = models.ForeignKey(Foto, on_delete=models.SET_NULL, null=True)
tecnicos=models.ForeignKey(Tecnicos, on_delete=models.SET_NULL, null=True)
#detalle=models.ForeignKey(Detalle, on_delete=models.SET_NULL, null=True)
def __str__(self):
return f'{self.cliente} {self.carro}{self.mano_obra} {self.parte}{self.garantia}' \
f'{self.pago}{self.foto}{self.tecnicos}'
new-estimate-7-preview.py
<div class="invoice-title">
{% if presupuestos %}
<h4 class="float-end font-size-16">Estimate #0001 <span class="badge bg-success font-size-12 ms-2">Paid</span></h4>
<div class="mb-4">
<strong>LOGO</strong>
</div>
{% for presupuesto in presupuestos %}
<div class="text-muted">
<p class="mb-1"><i class="uil uil-envelope-alt me-1"></i> {{presupuestos.cliente}}</p>
<p class="mb-1"><i class="uil uil-phone me-1"></i> {{presupuestos.carro}}</p>
</div>
{% endfor %}
{% endif %}
</div>