minor: document legacy links command
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -263,6 +263,7 @@ ipython_config.py
|
|||||||
# commonly ignored for libraries.
|
# commonly ignored for libraries.
|
||||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
#poetry.lock
|
#poetry.lock
|
||||||
|
poetry.toml
|
||||||
|
|
||||||
# pdm
|
# pdm
|
||||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
@@ -322,7 +323,7 @@ cython_debug/
|
|||||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
.idea/
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Project-specific files that must not be committed
|
# Project-specific files that must not be committed
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -37,6 +37,26 @@ python manage.py backup_db
|
|||||||
По умолчанию файл дампа сохраняется в `database/backups/`. Восстановление делается обычной командой
|
По умолчанию файл дампа сохраняется в `database/backups/`. Восстановление делается обычной командой
|
||||||
`python manage.py loaddata <fixture>.json` в пустую базу после `python manage.py migrate`.
|
`python manage.py loaddata <fixture>.json` в пустую базу после `python manage.py migrate`.
|
||||||
|
|
||||||
|
## Замена старых Joomla-ссылок в контенте
|
||||||
|
|
||||||
|
Для массовой замены старых внутренних ссылок в HTML-контенте используй management command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd cadpoint
|
||||||
|
python manage.py replace_legacy_links
|
||||||
|
```
|
||||||
|
|
||||||
|
По умолчанию команда работает в режиме `dry-run`: она только показывает, какие поля и записи
|
||||||
|
будут изменены. Чтобы записать изменения в базу, добавь флаг:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd cadpoint
|
||||||
|
python manage.py replace_legacy_links --apply
|
||||||
|
```
|
||||||
|
|
||||||
|
Сейчас команда чинит только кросс-ссылки на статьи. Ссылки на картинки и прочие медиа пока
|
||||||
|
оставлены как есть.
|
||||||
|
|
||||||
Для нового окружения на Poetry:
|
Для нового окружения на Poetry:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user