dtelenkov il y a 4 mois
Parent
commit
4792ed9f02
2 fichiers modifiés avec 53 ajouts et 11 suppressions
  1. 16 11
      .obsidian/workspace.json
  2. 37 0
      Django/common.md

+ 16 - 11
.obsidian/workspace.json

@@ -8,34 +8,35 @@
         "type": "tabs",
         "children": [
           {
-            "id": "38ab71b6e7063edb",
+            "id": "5e9457fc4512abce",
             "type": "leaf",
             "state": {
               "type": "markdown",
               "state": {
-                "file": "todo/Счета.md",
+                "file": "todo/Тренировки и занятия.md",
                 "mode": "source",
                 "source": false
               },
               "icon": "lucide-file",
-              "title": "Счета"
+              "title": "Тренировки и занятия"
             }
           },
           {
-            "id": "5e9457fc4512abce",
+            "id": "c0fb8e8aa0c2c9a6",
             "type": "leaf",
             "state": {
               "type": "markdown",
               "state": {
-                "file": "todo/Тренировки и занятия.md",
+                "file": "todo/Счета.md",
                 "mode": "source",
                 "source": false
               },
               "icon": "lucide-file",
-              "title": "Тренировки и занятия"
+              "title": "Счета"
             }
           }
-        ]
+        ],
+        "currentTab": 1
       }
     ],
     "direction": "vertical"
@@ -150,10 +151,16 @@
       "markdown-importer:Импорт Markdown-файлов": false
     }
   },
-  "active": "38ab71b6e7063edb",
+  "active": "c0fb8e8aa0c2c9a6",
   "lastOpenFiles": [
-    "todo/Разное.md",
     "todo/Задачи по направлениям.md",
+    "Django/common.md",
+    "English/img/2-2.jpg",
+    "Django",
+    "English/img/2-3.jpg",
+    "English/Homework.md",
+    "todo/Счета.md",
+    "todo/Разное.md",
     "Python/function основное.md",
     "English/img/1-9.jpg",
     "English/img/1-8.jpg",
@@ -163,8 +170,6 @@
     "English/img/1-4.jpg",
     "English/img/1-3.jpg",
     "English/img/1-2.jpg",
-    "English/img/1-1.jpg",
-    "todo/Счета.md",
     "todo/Тренировки и занятия.md",
     "English/Text 2.md",
     "ROTEK/bt67xx/common.md",

+ 37 - 0
Django/common.md

@@ -0,0 +1,37 @@
+Установка
+```bash
+$ python -m pip install Django==5.1.4
+```
+Версия
+```bash
+$ python -m django --version
+```
+Старт проекта
+```bash
+$ mkdir tutorial
+$ django-admin startproject mysite tutorial
+```
+Управление проектом
+```bash
+$ django-admin <command> [options]
+$ manage.py <command> [options]
+$ python -m django <command> [options]
+
+# Возможно устоновить модуль colorama для подсветки вывода
+$ python -m pip install "coloram >= 0.4.6"
+```
+Старт сервера
+```bash
+$ python manage.py runserver
+
+# Или через django-admin (но с установкой переменной окружения)
+...\> set DJANGO_SETTINGS_MODULE=mysite.settings
+$ export DJANGO_SETTINGS_MODULE=mysite.settings
+
+$ django-admin runserver
+```
+
+Остановился на settings.py
+https://docs.djangoproject.com/en/5.1/intro/tutorial01/
+https://docs.djangoproject.com/en/5.1/topics/settings/#designating-the-settings
+