30 lines
666 B
Python
30 lines
666 B
Python
|
import uuid
|
||
|
|
||
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||
|
from django.shortcuts import render
|
||
|
from django.views import View
|
||
|
from mixins.views import (
|
||
|
ObjectCreate,
|
||
|
ObjectDelete,
|
||
|
ObjectList,
|
||
|
ObjectRead,
|
||
|
ObjectUpdate,
|
||
|
)
|
||
|
|
||
|
from core.models import Drug
|
||
|
|
||
|
# class Search(View):
|
||
|
# template_name = "widgets/widget.html"
|
||
|
|
||
|
# def get(self, request):
|
||
|
# unique = str(uuid.uuid4())[:8]
|
||
|
# return render(request, self.template_name, {"unique": unique})
|
||
|
|
||
|
|
||
|
class Search(LoginRequiredMixin, ObjectRead):
|
||
|
model = Drug
|
||
|
detail_template = "window-content/drug_search.html"
|
||
|
|
||
|
def get_object(self, type):
|
||
|
return {}
|