Category Archives: Web

Upgrade Weblate from git 2.18 version to latest docker

MAKE A BACKUP FIRST.
Ensure the website runs well before upgrading.

If encountering error ImproperlyConfigured: Requested setting DATA_DIR, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. when starting server, run export DJANGO_SETTINGS_MODULE=weblate.settings.

Read Generic upgrade instructions from official weblate doc first.

Special instruction for my build: Custom changes to weblate (weblate/trans/formats.py)and translate-toolkit (translate/storage/properties.py)to provide a special “Minecraft Lang File” format. The HTTP server is Gunicorn with Nginx. The operating system is Ubuntu 16.04 and weblate runs on Python 2.7. The database is PostgreSQL 9.5. These softwares will be upgraded or replaced during progress.

Universal step:

Run git fetch --all before git operation to ensure latest code exists.

  1. Read Version specific instructions and follow it.
  2. Stop gunicorn/wsgi and celery worker.
  3. git stash (before 3.0.x)
  4. git reset --hard (before 3.0.x)
  5. git checkout weblate-x.x Usex.x.1 or the latest minor version if it exists for a major version.
  6. git stash pop (before 3.0.x)
  7. pip install -r requirements.txt
  8. find weblate -name '*.pyc' -delete to remove cached compiled bytecode.
  9. Update settings.py to accommodate to settings_example.py.
  10. python manage.py migrate --noinput
  11. follow other manage commands in generic upgrade instructions.
  12. Start the server and check if everything works well.
Continue reading Upgrade Weblate from git 2.18 version to latest docker

理想的Blog程序

支持markdown排版

方便贴图/管理图片/相册(多媒体)

方便实现手风琴/标签页/Spoiler/表格/Toc等等

有不同的形式(像WordPress的日志/图像等)

界面基于框架/模板, 易于修改

能为每篇文章单独指定一些特殊的css/js内容