from django.shortcuts import render, redirect
from .models import LaptopModel
from django.views import View
from django.views.generic.list import ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView


class HomeView(View):

    def get(self, request):
        template_name = 'Home.html'
        return render(request, template_name)


class Laptoplistview(ListView):
    model = LaptopModel
    template_name = 'showlaptop.html'


class LaptopCreateView(CreateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopUpadteView(UpdateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopdeleteView(DeleteView):
    model = LaptopModel
    success_url = '/laptop/show'

697369827142f03e16bede1a00706fb2532c010f
<mask token>


class LaptopCreateView(CreateView):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class LaptopUpadteView(UpdateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopdeleteView(DeleteView):
    model = LaptopModel
    success_url = '/laptop/show'

<mask token>


class LaptopCreateView(CreateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopUpadteView(UpdateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopdeleteView(DeleteView):
    model = LaptopModel
    success_url = '/laptop/show'

<mask token>


class HomeView(View):
    <mask token>


class Laptoplistview(ListView):
    model = LaptopModel
    template_name = 'showlaptop.html'


class LaptopCreateView(CreateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopUpadteView(UpdateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopdeleteView(DeleteView):
    model = LaptopModel
    success_url = '/laptop/show'

from django.shortcuts import render, redirect
from .models import LaptopModel
from django.views import View
from django.views.generic.list import ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView


class HomeView(View):

    def get(self, request):
        template_name = 'Home.html'
        return render(request, template_name)


class Laptoplistview(ListView):
    model = LaptopModel
    template_name = 'showlaptop.html'


class LaptopCreateView(CreateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopUpadteView(UpdateView):
    model = LaptopModel
    template_name = 'addlaptop.html'
    fields = '__all__'
    success_url = '/laptop/show'


class LaptopdeleteView(DeleteView):
    model = LaptopModel
    success_url = '/laptop/show'
