installation
This commit is contained in:
@@ -58,11 +58,11 @@ REDIS_PORT=6379
|
||||
# database: sqlite3 | mariadb | postgrey
|
||||
#
|
||||
# sqlite3
|
||||
SQLITE3=default
|
||||
SQLITE3=None
|
||||
SQLITE3_PATH=
|
||||
|
||||
# mariadb
|
||||
MARIADB=None
|
||||
MARIADB=default
|
||||
DATABASE_MARIADB_HOST=127.0.0.1
|
||||
DATABASE_MARIADB_PORT=3306
|
||||
|
||||
|
||||
@@ -6,22 +6,6 @@ from django.conf import settings
|
||||
from django.core.management import BaseCommand
|
||||
from django_celery_beat.models import IntervalSchedule, CrontabSchedule, SolarSchedule
|
||||
from django.contrib.auth import get_user_model
|
||||
from scanner.models import Well
|
||||
|
||||
def create_Well():
|
||||
try:
|
||||
if Well.objects.count() == 0:
|
||||
for name in [
|
||||
'A1', 'A2', 'A3', 'A4', 'A5', 'A6',
|
||||
'B1', 'B2', 'B3', 'B4', 'B5', 'B6',
|
||||
'C1', 'C2', 'C3', 'C4', 'C5', 'C6',
|
||||
'D1', 'D2', 'D3', 'D4', 'D5', 'D6',
|
||||
]:
|
||||
Well.objects.create(name=name, user_id=1)
|
||||
print('Creating Well')
|
||||
except Exception as e:
|
||||
print(f'Creating well error {e}')
|
||||
|
||||
|
||||
def create_user():
|
||||
try:
|
||||
@@ -84,7 +68,6 @@ class Command(BaseCommand):
|
||||
try:
|
||||
create_user()
|
||||
create_schedule()
|
||||
create_Well()
|
||||
|
||||
except Exception as e:
|
||||
print(f'Creating monitor error {e}')
|
||||
|
||||
@@ -20,7 +20,7 @@ import threading
|
||||
import logging
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Optional, Callable, TYPE_CHECKING, Any
|
||||
from typing import Optional, Callable, TYPE_CHECKING
|
||||
|
||||
from django.conf import settings
|
||||
from modules.planarian_tracker import PlanarianTracker
|
||||
|
||||
@@ -44,6 +44,7 @@ class Configuration(models.Model):
|
||||
# Grbl configuration
|
||||
grbl_xmax = models.FloatField(_("Grbl Xmax"), help_text=_("CNC Grbl Xmax en mm"), blank=False, default=350.0)
|
||||
grbl_ymax = models.FloatField(_("Grbl Ymax"), help_text=_("CNC Grbl Ymax en mm"), blank=False, default=250.0)
|
||||
|
||||
|
||||
# camera configuration
|
||||
use_rpicam = models.BooleanField(_("Utiliser rpicam"), help_text=_("Par défaaut. Sinon USB webcam"), default=True)
|
||||
|
||||
Reference in New Issue
Block a user