Basic table inline edit functionality

This commit is contained in:
Eden Kirin
2024-05-15 22:15:27 +02:00
parent 7c20d4d23e
commit c7f89a9ab4
13 changed files with 193 additions and 4 deletions

View File

@ -1,6 +1,21 @@
import os
import shutil
from django.apps import AppConfig
from django.conf import settings
class MainConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "project.main"
def ready(self):
"""copy template database if db not exists"""
db_fname = settings.DATABASES["default"]["NAME"]
template_db_fname = settings.BASE_DIR / "db_template.sqlite3"
if os.path.exists(db_fname):
return
shutil.copyfile(template_db_fname, db_fname)