One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
from rest_framework.permissions import BasePermission, SAFE_METHODS | |
class IsAdminOrReadOnly(BasePermission): | |
def has_permission(self, request, view): | |
if request.method in SAFE_METHODS: | |
return True | |
else: | |
return request.user.is_staff |
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
driver = webdriver.Chrome(service=Service( | |
ChromeDriverManager().install() |