wallet/apps/superapp/views.py
2022-09-04 04:03:07 +04:30

20 lines
644 B
Python

from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.generic import ListView, DetailView
from .models import App
@method_decorator(login_required, name='dispatch')
class AppListView(ListView):
model = App
template_name = 'superapp/app_list.html'\
@method_decorator(login_required, name='dispatch')
class AppDetailView(DetailView):
model = App
template_name = 'superapp/app_detail.html'
pk_url_kwarg = 'uuid'
# def get_queryset(self):
# return App.objects.filter(type=App.AppTypeChoices.EXTERNAL)