Video plate capture: calibration, edge enhance, auto-detect well borders
This commit is contained in:
@@ -31,7 +31,7 @@ class Command(BaseCommand):
|
||||
|
||||
)
|
||||
print()
|
||||
print(f"Export video: {job.id}")
|
||||
print(f"Export video: {job.id}") # type: ignore[union-attr]
|
||||
except Exception as e:
|
||||
print("Export video uuid error", e)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ def create_user():
|
||||
if User.objects.count() == 0:
|
||||
for email, username, password, is_superuser in settings.ADMINS:
|
||||
if is_superuser:
|
||||
User.objects.create_superuser(
|
||||
User.objects.create_superuser( # type: ignore[attr-defined]
|
||||
email=email,
|
||||
username=username,
|
||||
password=password,
|
||||
@@ -21,7 +21,7 @@ def create_user():
|
||||
is_superuser=is_superuser,
|
||||
)
|
||||
else:
|
||||
User.objects.create_user(
|
||||
User.objects.create_user( # type: ignore[attr-defined]
|
||||
email=email,
|
||||
username=username,
|
||||
password=password,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# encoding: utf-8
|
||||
from uuid import uuid4
|
||||
from django.core.management import BaseCommand
|
||||
from django.core.management.utils import get_random_string;
|
||||
from django.utils.crypto import get_random_string
|
||||
|
||||
class Command(BaseCommand):
|
||||
def add_arguments(self, parser):
|
||||
|
||||
@@ -4,7 +4,11 @@ Created on 19 janv. 2026
|
||||
@author: denis
|
||||
'''
|
||||
from django.core.management.base import BaseCommand
|
||||
from modules.grbl import GRBLController, wait_for
|
||||
from modules.grbl import GRBLController
|
||||
import threading
|
||||
|
||||
def wait_for(delay: float = 1.0) -> None:
|
||||
threading.Event().wait(delay)
|
||||
import time
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
print("Django BASE_DIR:", BASE_DIR)
|
||||
|
||||
PACKAGE_DIR = BASE_DIR.parent
|
||||
APP_DATAS = PACKAGE_DIR / config('APP_DATAS')
|
||||
APP_DATAS = PACKAGE_DIR / str(config('APP_DATAS'))
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
||||
@@ -35,10 +35,10 @@ SECRET_KEY = config("SECRET_KEY")
|
||||
DEBUG = config('DEBUG', cast=bool)
|
||||
|
||||
DOMAIN_SERVER = config("DOMAIN_SERVER")
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
|
||||
ALLOWED_HOSTS: list = list(config('ALLOWED_HOSTS', cast=Csv()))
|
||||
ALLOWED_HOSTS += [DOMAIN_SERVER, '*']
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = config('CSRF_TRUSTED_ORIGINS', cast=Csv())
|
||||
CSRF_TRUSTED_ORIGINS: list = list(config('CSRF_TRUSTED_ORIGINS', cast=Csv()))
|
||||
CSRF_TRUSTED_ORIGINS += [f'http://{DOMAIN_SERVER}', f'https://{DOMAIN_SERVER}']
|
||||
|
||||
SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin'
|
||||
@@ -237,7 +237,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
## LOGGING
|
||||
# CRITICAL=50, ERROR=40, WARN=30, INFO=20, DEBUG=10 and NOTSET=0
|
||||
|
||||
LOGGING_FILE = config('LOGGING_FILE')
|
||||
LOGGING_FILE: str = str(config('LOGGING_FILE'))
|
||||
IS_LOGGING = config('IS_LOGGING', cast=bool)
|
||||
IS_LOGGING = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user