denshoproject / encyc-tng

Densho Encyclopedia: The Next Generation
Other
0 stars 0 forks source link

Proof-of-concept article/psms migration script #4

Open gjost opened 5 months ago

gjost commented 5 months ago

IDEA: Install encyc-core into the encyc-tail venv, then run manage.py shell

USER@devbox:/opt/encyc-tail$ cd /opt/encyc-tail
USER@devbox:/opt/encyc-tail$ sudo su encyc
encyc@devbox:/opt/encyc-tail$ source /opt/encyc-tail/venv/tail/bin/activate
(tail) encyc@devbox:/opt/encyc-tail$ pip install -U -r /opt/encyc-core/requirements.txt
(tail) encyc@devbox:/opt/encyc-tail$ python src/manage.py shell
>>> from encyc.models.legacy import Page as LegacyPage
>>> import wagtail
>>> from encyclopedia.blocks import DataboxCampBlock
>>> from encyclopedia.models import Article

Import scripts now have access to encyc-core code.