diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index b93685c..a359174 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -138,6 +138,12 @@ run_migrations() {
echo "Collecting static files..."
python manage.py collectstatic --noinput
+ # Устанавливаем права ПОСЛЕ collectstatic
+ echo "Setting permissions on static files..."
+ STATIC_ROOT="/app/myproject/staticfiles"
+ find "$STATIC_ROOT" -type d -exec chmod 755 {} \; 2>/dev/null || true
+ find "$STATIC_ROOT" -type f -exec chmod 644 {} \; 2>/dev/null || true
+
echo "Ensuring public tenant exists..."
python /app/docker/create_public_tenant.py
}
@@ -225,6 +231,17 @@ case "$1" in
run_migrations
create_superuser
;;
+ collectstatic)
+ wait_for_postgres
+ setup_directories
+ echo "Collecting static files..."
+ python manage.py collectstatic --noinput
+ echo "Setting permissions on static files..."
+ STATIC_ROOT="/app/myproject/staticfiles"
+ find "$STATIC_ROOT" -type d -exec chmod 755 {} \; 2>/dev/null || true
+ find "$STATIC_ROOT" -type f -exec chmod 644 {} \; 2>/dev/null || true
+ echo "Static files collected and permissions set."
+ ;;
shell)
exec python manage.py shell
;;
diff --git a/myproject/inventory/templates/inventory/inventory/inventory_detail.html b/myproject/inventory/templates/inventory/inventory/inventory_detail.html
index 771c3a2..18afc95 100644
--- a/myproject/inventory/templates/inventory/inventory/inventory_detail.html
+++ b/myproject/inventory/templates/inventory/inventory/inventory_detail.html
@@ -284,12 +284,25 @@
{% endif %}
-
-
+
+