feat: backoffice setup
CI / ci (ubuntu-24.04, 3.13) (push) Has been cancelled

This commit is contained in:
2026-07-23 13:31:53 +02:00
parent 87405f31fa
commit 2a9407e676
45 changed files with 2148 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
from django.views.generic import ListView
from backoffice.mixins import BackofficeCRUDMixin, BackofficeHtmxMixin
from shop.models import Provider
SECTION = 'providers'
class ProviderListView(BackofficeCRUDMixin, BackofficeHtmxMixin, ListView):
model = Provider
permission_required = 'shop.view_provider'
section = SECTION
paginate_by = 20
template_name = 'backoffice/generic/list.html'
fragment_template_name = 'backoffice/generic/_list_fragment.html'
ordering = 'name'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context.update(
{
'title': 'Proveedores',
'columns': [('Nombre', 'name'), ('NIF/CIF', 'vat_id'), ('E-mail', 'email'), ('Teléfono', 'phone')],
}
)
return context
# CRUD pendiente: replicar ProductCategoryCreateView/UpdateView/DeleteView de
# backoffice/views/products.py sobre el modelo Provider.