Переглянути джерело

Removed unnecessary dependencies and fixed installation script in Windows

Tony Kurts 1 рік тому
батько
коміт
d2d7f9c01b
3 змінених файлів з 29 додано та 28 видалено
  1. 29 26
      bin/install.bat
  2. 0 1
      core/settings.py
  3. 0 1
      requirements.txt

+ 29 - 26
bin/install.bat

@@ -1,25 +1,5 @@
 @echo off
 
-REM Function to check if a repository exists and perform git pull or git clone
-:update_repository
-setlocal
-set "repo_url=%~1"
-set "repo_dir=%~2"
-set "repo_branch=%~3"
-
-if exist "%repo_dir%" (
-    rem If the directory exists, then do a git pull
-    echo Updating %repo_dir%...
-    cd "%repo_dir%" || exit /b
-    git pull
-    cd ..
-) else (
-    rem If the directory does not exist, then do a git clone
-    echo Cloning %repo_url% into %repo_dir%...
-    git clone -b %repo_branch% %repo_url% %repo_dir%
-)
-endlocal
-
 REM Update repositories
 call :update_repository "https://git.sharix-app.org/ShariX_Open/sharix-open-tickets.git" "tickets" "master"
 call :update_repository "https://git.sharix-app.org/ShariX_Open/sharix-open-backend.git" "metaservicesynced" "metasynced_module"
@@ -31,11 +11,11 @@ git pull
 
 REM Create a Python virtual environment and activate it
 python -m venv venv
-.\venv\Scripts\activate
+call venv\Scripts\activate
 
 REM Upgrade pip and install requirements
-pip install --upgrade pip
-pip install -r requirements.txt
+python -m pip install --upgrade pip
+python -m pip install -r requirements.txt
 
 REM Checking for core/settings_vars.py
 if exist core\settings_vars.py (
@@ -46,6 +26,29 @@ if exist core\settings_vars.py (
 )
 
 REM Run Django migrations and other commands
-python manage.py makemigrations SharixAdmin metaservicesynced tickets webservice_running landing
-python manage.py migrate
-python manage.py collectstatic --clear --no-input
+python -m manage.py makemigrations SharixAdmin metaservicesynced tickets webservice_running landing
+python -m manage.py migrate
+python -m manage.py collectstatic --clear --no-input
+
+goto :eof
+
+REM Function to check if a repository exists and perform git pull or git clone
+:update_repository
+setlocal
+set "repo_url=%~1"
+set "repo_dir=%~2"
+set "repo_branch=%~3"
+
+if exist "%repo_dir%" (
+    rem If the directory exists, then do a git pull
+    echo Updating %repo_dir%...
+    cd "%repo_dir%" || exit /b
+    git pull
+    cd ..
+) else (
+    rem If the directory does not exist, then do a git clone
+    echo Cloning %repo_url% into %repo_dir%...
+    git clone -b %repo_branch% %repo_url% %repo_dir%
+)
+endlocal
+goto :eof

+ 0 - 1
core/settings.py

@@ -47,7 +47,6 @@ INSTALLED_APPS = [
     'rest_framework',
     'rest_framework.authtoken',
     'djoser',
-    'schema_graph',
     'drf_yasg',
     'django_spaghetti',
     'debug_toolbar',

+ 0 - 1
requirements.txt

@@ -13,7 +13,6 @@ Django==4.1.3
 django-debug-toolbar==4.1.0
 django-extensions==3.2.1
 django-jazzmin==2.6.0
-django-schema-graph==2.2.1
 django-spaghetti-and-meatballs==0.4.2
 django-tables2==2.4.1
 django-templated-mail==1.1.1