env
This commit is contained in:
parent
7b89dd25e7
commit
2e09d6dcd4
|
@ -24,6 +24,15 @@
|
||||||
"detail": "pathlib",
|
"detail": "pathlib",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "dotenv",
|
||||||
|
"kind": 6,
|
||||||
|
"isExtraImport": true,
|
||||||
|
"importPath": "dotenv",
|
||||||
|
"description": "dotenv",
|
||||||
|
"detail": "dotenv",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "admin",
|
"label": "admin",
|
||||||
"importPath": "django.contrib",
|
"importPath": "django.contrib",
|
||||||
|
@ -97,11 +106,20 @@
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "AppConfig",
|
"label": "django.db.models.deletion",
|
||||||
"importPath": "django.apps",
|
"kind": 6,
|
||||||
"description": "django.apps",
|
|
||||||
"isExtraImport": true,
|
"isExtraImport": true,
|
||||||
"detail": "django.apps",
|
"importPath": "django.db.models.deletion",
|
||||||
|
"description": "django.db.models.deletion",
|
||||||
|
"detail": "django.db.models.deletion",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "migrations",
|
||||||
|
"importPath": "django.db",
|
||||||
|
"description": "django.db",
|
||||||
|
"isExtraImport": true,
|
||||||
|
"detail": "django.db",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -112,6 +130,22 @@
|
||||||
"detail": "django.db",
|
"detail": "django.db",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "models",
|
||||||
|
"importPath": "django.db",
|
||||||
|
"description": "django.db",
|
||||||
|
"isExtraImport": true,
|
||||||
|
"detail": "django.db",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "AppConfig",
|
||||||
|
"importPath": "django.apps",
|
||||||
|
"description": "django.apps",
|
||||||
|
"isExtraImport": true,
|
||||||
|
"detail": "django.apps",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "TestCase",
|
"label": "TestCase",
|
||||||
"importPath": "django.test",
|
"importPath": "django.test",
|
||||||
|
@ -1634,7 +1668,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "BASE_DIR = Path(__file__).resolve().parent.parent\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = 'django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze'\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [",
|
"peekOfCode": "BASE_DIR = Path(__file__).resolve().parent.parent\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = \"django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze\"\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1643,7 +1677,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "SECRET_KEY = 'django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze'\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [\n 'inventory',\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',",
|
"peekOfCode": "SECRET_KEY = \"django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze\"\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [\n \"inventory\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1652,7 +1686,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "DEBUG = True\nALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [\n 'inventory',\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',",
|
"peekOfCode": "DEBUG = True\nALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [\n \"inventory\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.sessions\",\n \"django.contrib.messages\",",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1661,7 +1695,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "ALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [\n 'inventory',\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',",
|
"peekOfCode": "ALLOWED_HOSTS = []\n# Application definition\nINSTALLED_APPS = [\n \"inventory\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.sessions\",\n \"django.contrib.messages\",\n \"django.contrib.staticfiles\",",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1670,7 +1704,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "INSTALLED_APPS = [\n 'inventory',\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n 'rest_framework',\n]",
|
"peekOfCode": "INSTALLED_APPS = [\n \"inventory\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.sessions\",\n \"django.contrib.messages\",\n \"django.contrib.staticfiles\",\n \"rest_framework\",\n]",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1679,7 +1713,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "MIDDLEWARE = [\n 'django.middleware.security.SecurityMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.common.CommonMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\nROOT_URLCONF = 'api.urls'",
|
"peekOfCode": "MIDDLEWARE = [\n \"django.middleware.security.SecurityMiddleware\",\n \"django.contrib.sessions.middleware.SessionMiddleware\",\n \"django.middleware.common.CommonMiddleware\",\n \"django.middleware.csrf.CsrfViewMiddleware\",\n \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n \"django.contrib.messages.middleware.MessageMiddleware\",\n \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n]\nROOT_URLCONF = \"api.urls\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1688,7 +1722,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "ROOT_URLCONF = 'api.urls'\nTEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [],\n 'APP_DIRS': True,\n 'OPTIONS': {\n 'context_processors': [\n 'django.template.context_processors.debug',\n 'django.template.context_processors.request',",
|
"peekOfCode": "ROOT_URLCONF = \"api.urls\"\nTEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n \"django.template.context_processors.debug\",\n \"django.template.context_processors.request\",",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1697,7 +1731,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "TEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [],\n 'APP_DIRS': True,\n 'OPTIONS': {\n 'context_processors': [\n 'django.template.context_processors.debug',\n 'django.template.context_processors.request',\n 'django.contrib.auth.context_processors.auth',",
|
"peekOfCode": "TEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n \"django.template.context_processors.debug\",\n \"django.template.context_processors.request\",\n \"django.contrib.auth.context_processors.auth\",",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1706,7 +1740,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "WSGI_APPLICATION = 'api.wsgi.application'\n# Database\n# https://docs.djangoproject.com/en/5.0/ref/settings/#databases\nDATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.postgresql\",\n \"OPTIONS\": {\n # in ~/.pg_service.conf\n 'service': 'to_inventory_db',\n \"passfile\": \".pgpass\",",
|
"peekOfCode": "WSGI_APPLICATION = \"api.wsgi.application\"\n# Database\n# https://docs.djangoproject.com/en/5.0/ref/settings/#databases\nDATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.postgresql\",\n \"NAME\": os.environ.get(\"DB_NAME\"),\n \"USER\": os.environ.get(\"DB_USER\"),\n \"PASSWORD\": os.environ.get(\"DB_PASSWORD\"),\n \"HOST\": os.environ.get(\"DB_HOST\"),",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1715,7 +1749,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "DATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.postgresql\",\n \"OPTIONS\": {\n # in ~/.pg_service.conf\n 'service': 'to_inventory_db',\n \"passfile\": \".pgpass\",\n },\n }\n}",
|
"peekOfCode": "DATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.postgresql\",\n \"NAME\": os.environ.get(\"DB_NAME\"),\n \"USER\": os.environ.get(\"DB_USER\"),\n \"PASSWORD\": os.environ.get(\"DB_PASSWORD\"),\n \"HOST\": os.environ.get(\"DB_HOST\"),\n \"PORT\": os.environ.get(\"DB_PORT\"),\n }\n}",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1724,7 +1758,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "AUTH_PASSWORD_VALIDATORS = [\n {\n 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',\n },",
|
"peekOfCode": "AUTH_PASSWORD_VALIDATORS = [\n {\n \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n },\n {\n \"NAME\": \"django.contrib.auth.password_validation.MinimumLengthValidator\",\n },\n {\n \"NAME\": \"django.contrib.auth.password_validation.CommonPasswordValidator\",\n },",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1733,7 +1767,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "LANGUAGE_CODE = 'en-us'\nTIME_ZONE = 'UTC'\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = 'static/'\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'",
|
"peekOfCode": "LANGUAGE_CODE = \"en-us\"\nTIME_ZONE = \"UTC\"\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1742,7 +1776,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "TIME_ZONE = 'UTC'\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = 'static/'\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'",
|
"peekOfCode": "TIME_ZONE = \"UTC\"\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1751,7 +1785,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "USE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = 'static/'\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'",
|
"peekOfCode": "USE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1760,7 +1794,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "USE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = 'static/'\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'",
|
"peekOfCode": "USE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1769,7 +1803,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "STATIC_URL = 'static/'\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'",
|
"peekOfCode": "STATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1778,7 +1812,7 @@
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"importPath": "back.api.settings",
|
"importPath": "back.api.settings",
|
||||||
"description": "back.api.settings",
|
"description": "back.api.settings",
|
||||||
"peekOfCode": "DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'",
|
"peekOfCode": "DEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
|
||||||
"detail": "back.api.settings",
|
"detail": "back.api.settings",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
@ -1809,6 +1843,15 @@
|
||||||
"detail": "back.api.wsgi",
|
"detail": "back.api.wsgi",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Migration",
|
||||||
|
"kind": 6,
|
||||||
|
"importPath": "back.inventory.migrations.0001_initial",
|
||||||
|
"description": "back.inventory.migrations.0001_initial",
|
||||||
|
"peekOfCode": "class Migration(migrations.Migration):\n initial = True\n dependencies = [\n ]\n operations = [\n migrations.CreateModel(\n name='Partner',\n fields=[\n ('id', models.AutoField(primary_key=True, serialize=False)),\n ],",
|
||||||
|
"detail": "back.inventory.migrations.0001_initial",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "InventoryConfig",
|
"label": "InventoryConfig",
|
||||||
"kind": 6,
|
"kind": 6,
|
||||||
|
@ -1841,7 +1884,16 @@
|
||||||
"kind": 6,
|
"kind": 6,
|
||||||
"importPath": "back.inventory.serializers",
|
"importPath": "back.inventory.serializers",
|
||||||
"description": "back.inventory.serializers",
|
"description": "back.inventory.serializers",
|
||||||
"peekOfCode": "class PartnerSerializer(serializers.ModelSerializer):\n class Meta:\n model = Partner\n fields = [\"id\"]",
|
"peekOfCode": "class PartnerSerializer(serializers.ModelSerializer):\n class Meta:\n model = Partner\n fields = [\"id\"]\nclass ElementSerializer(serializers.ModelSerializer):\n class Meta:\n model = Element\n fields = [\"id\", \"external_id\", \"type\", \"photo\", \"additional_text\", \"partner\"]",
|
||||||
|
"detail": "back.inventory.serializers",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "ElementSerializer",
|
||||||
|
"kind": 6,
|
||||||
|
"importPath": "back.inventory.serializers",
|
||||||
|
"description": "back.inventory.serializers",
|
||||||
|
"peekOfCode": "class ElementSerializer(serializers.ModelSerializer):\n class Meta:\n model = Element\n fields = [\"id\", \"external_id\", \"type\", \"photo\", \"additional_text\", \"partner\"]",
|
||||||
"detail": "back.inventory.serializers",
|
"detail": "back.inventory.serializers",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
|
|
@ -88,4 +88,5 @@ local_settings.py
|
||||||
.env
|
.env
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
|
|
||||||
.pgpass
|
.pgpass
|
||||||
|
/*/migrations/0*
|
|
@ -11,7 +11,10 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
|
import dotenv
|
||||||
|
|
||||||
|
dotenv.load_dotenv(os.path.join(os.path.dirname(os.path.dirname(__file__)), '.env'))
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
|
@ -20,7 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = 'django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze'
|
SECRET_KEY = "django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
@ -31,45 +34,45 @@ ALLOWED_HOSTS = []
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'inventory',
|
"inventory",
|
||||||
'django.contrib.admin',
|
"django.contrib.admin",
|
||||||
'django.contrib.auth',
|
"django.contrib.auth",
|
||||||
'django.contrib.contenttypes',
|
"django.contrib.contenttypes",
|
||||||
'django.contrib.sessions',
|
"django.contrib.sessions",
|
||||||
'django.contrib.messages',
|
"django.contrib.messages",
|
||||||
'django.contrib.staticfiles',
|
"django.contrib.staticfiles",
|
||||||
'rest_framework',
|
"rest_framework",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
"django.middleware.security.SecurityMiddleware",
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
'django.middleware.common.CommonMiddleware',
|
"django.middleware.common.CommonMiddleware",
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
"django.middleware.csrf.CsrfViewMiddleware",
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
"django.contrib.messages.middleware.MessageMiddleware",
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'api.urls'
|
ROOT_URLCONF = "api.urls"
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||||
'DIRS': [],
|
"DIRS": [],
|
||||||
'APP_DIRS': True,
|
"APP_DIRS": True,
|
||||||
'OPTIONS': {
|
"OPTIONS": {
|
||||||
'context_processors': [
|
"context_processors": [
|
||||||
'django.template.context_processors.debug',
|
"django.template.context_processors.debug",
|
||||||
'django.template.context_processors.request',
|
"django.template.context_processors.request",
|
||||||
'django.contrib.auth.context_processors.auth',
|
"django.contrib.auth.context_processors.auth",
|
||||||
'django.contrib.messages.context_processors.messages',
|
"django.contrib.messages.context_processors.messages",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
WSGI_APPLICATION = 'api.wsgi.application'
|
WSGI_APPLICATION = "api.wsgi.application"
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
|
@ -78,11 +81,11 @@ WSGI_APPLICATION = 'api.wsgi.application'
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": {
|
||||||
"ENGINE": "django.db.backends.postgresql",
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
"OPTIONS": {
|
"NAME": os.environ.get("DB_NAME"),
|
||||||
# in ~/.pg_service.conf
|
"USER": os.environ.get("DB_USER"),
|
||||||
'service': 'to_inventory_db',
|
"PASSWORD": os.environ.get("DB_PASSWORD"),
|
||||||
"passfile": ".pgpass",
|
"HOST": os.environ.get("DB_HOST"),
|
||||||
},
|
"PORT": os.environ.get("DB_PORT"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,16 +95,16 @@ DATABASES = {
|
||||||
|
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -109,9 +112,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/5.0/topics/i18n/
|
# https://docs.djangoproject.com/en/5.0/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'en-us'
|
LANGUAGE_CODE = "en-us"
|
||||||
|
|
||||||
TIME_ZONE = 'UTC'
|
TIME_ZONE = "UTC"
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
|
@ -121,9 +124,9 @@ USE_TZ = True
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
# https://docs.djangoproject.com/en/5.0/howto/static-files/
|
# https://docs.djangoproject.com/en/5.0/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = 'static/'
|
STATIC_URL = "static/"
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from .models import Partner
|
from .models import Partner, Element
|
||||||
|
|
||||||
|
|
||||||
class PartnerSerializer(serializers.ModelSerializer):
|
class PartnerSerializer(serializers.ModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Partner
|
model = Partner
|
||||||
fields = ["id"]
|
fields = ["id"]
|
||||||
|
|
||||||
|
class ElementSerializer(serializers.ModelSerializer):
|
||||||
|
class Meta:
|
||||||
|
model = Element
|
||||||
|
fields = ["id", "external_id", "type", "photo", "additional_text", "partner"]
|
||||||
|
|
|
@ -238,6 +238,20 @@ files = [
|
||||||
{file = "psycopg2-2.9.9.tar.gz", hash = "sha256:d1454bde93fb1e224166811694d600e746430c006fbb031ea06ecc2ea41bf156"},
|
{file = "psycopg2-2.9.9.tar.gz", hash = "sha256:d1454bde93fb1e224166811694d600e746430c006fbb031ea06ecc2ea41bf156"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "python-dotenv"
|
||||||
|
version = "1.0.1"
|
||||||
|
description = "Read key-value pairs from a .env file and set them as environment variables"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8"
|
||||||
|
files = [
|
||||||
|
{file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"},
|
||||||
|
{file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
cli = ["click (>=5.0)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlparse"
|
name = "sqlparse"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
@ -306,4 +320,4 @@ files = [
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
content-hash = "56611ac7f25ac6f0383c0835afb3c695fedd9adf27499fe97ebee3c245c35d06"
|
content-hash = "c6bf0723d9f799bdbe4174c98f18b7177aae7054fd556c58905dc3b55ef98c99"
|
||||||
|
|
|
@ -14,6 +14,7 @@ psycopg2 = "^2.9.9"
|
||||||
markdown = "^3.6"
|
markdown = "^3.6"
|
||||||
django-filter = "^24.2"
|
django-filter = "^24.2"
|
||||||
pillow = "^10.3.0"
|
pillow = "^10.3.0"
|
||||||
|
python-dotenv = "^1.0.1"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
taskipy = "^1.12.2"
|
taskipy = "^1.12.2"
|
||||||
|
|
Loading…
Reference in New Issue