From 5707f31c8c0303d470750eb7007a1d8e7e598452 Mon Sep 17 00:00:00 2001 From: Merlin Buczek Date: Wed, 25 Sep 2019 10:39:34 +0200 Subject: [PATCH] Update docs, README --- README.md | 35 +------------------------ docs/developer_information/dev_notes.md | 17 +++++++++--- 2 files changed, 14 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 33d7ff7..0f0050c 100644 --- a/README.md +++ b/README.md @@ -42,37 +42,4 @@ See [django-auth-ldap docs](https://django-auth-ldap.readthedocs.io/en/latest/au - `python manage.py collectstatic`. See [Django docs](https://docs.djangoproject.com/en/2.2/ref/contrib/staticfiles/#collectstatic) # Deployment with Apache and mod_wsgi -For details see [Django docs](https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/). - -## Example configuration -``` -# Load wsgi module -LoadModule wsgi_module modules/mod_wsgi.so - -Alias /media/ /path/to/mpicms/mpicms/media/ -Alias /static/ /path/to/mpicms/staticfiles/ - -# Static files should be access seperately - - Require all granted - - - - Require all granted - - -WSGIPythonHome /path/to/venv -WSGIScriptAlias / /path/to/mpicms/config/wsgi.py - - - - Require all granted - - -``` - -# LDAP population -To populate the database with an existing LDAP user, run `django_auth_ldap.backend.LDAPBackend.populate_user()`. See [django-auth-ldap docs](https://django-auth-ldap.readthedocs.io/en/latest/users.html#updating-users) for details. - -# Python shell -Access with `python manage.py shell --settings=config.settings.production`. \ No newline at end of file +See [Django docs](https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/). \ No newline at end of file diff --git a/docs/developer_information/dev_notes.md b/docs/developer_information/dev_notes.md index 338b422..b270b1b 100644 --- a/docs/developer_information/dev_notes.md +++ b/docs/developer_information/dev_notes.md @@ -1,5 +1,14 @@ # Development Notes +## LDAP population +To populate the database with an existing LDAP user, run `django_auth_ldap.backend.LDAPBackend.populate_user()`. See [django-auth-ldap docs](https://django-auth-ldap.readthedocs.io/en/latest/users.html#updating-users) for details. + +## Python shell +Access with `python manage.py shell --settings=config.settings.production`. + +## Search Index +After objects have been created through a script, `manage.py update_index` sould be run. See [Wagtail docs](https://docs.wagtail.io/en/latest/topics/search/indexing.html#the-update-index-command). + ## Translation In `urls.py`, `i18n_patterns()` can be passed `prefix_default_language=False`. This disables the language url prefix for the default language, but results in breaking Django's `set_language` view (used by language selection dropdown), as it is not able to get the current url without language prefix. This could be solved by passing the redirect location as POST parameter `next`, and would require to write a hacky solution to remove the language prefix, if it exists. @@ -7,8 +16,8 @@ Individual StreamField blocks are not translateable yet, see [this issue](https: Empty fields (excluding StreamFields) are automatically populated with the the default langugage content due to [this issue](https://github.com/infoportugal/wagtail-modeltranslation/issues/247). -## Imports -Django lets you import ``, which will result in errors later. Only import `mpicms.`, as specified in the app configs. +### Updating translations +Run `python manage.py makemessages --ignore=users` to generate an updated `.po` file in `locale/de/LC_MESSAGES`. After editing the file, run `python manage.py compilemessages` to compile the new translations. See [Django docs](https://docs.djangoproject.com/en/2.2/topics/i18n/translation/) for details. -## Search Index -After objects have been created through a script, `manage.py update_index` sould be run. See [Wagtail docs](https://docs.wagtail.io/en/latest/topics/search/indexing.html#the-update-index-command). \ No newline at end of file +## Imports +Django lets you import ``, which will result in errors later. Only import `mpicms.`, as specified in the app configs. \ No newline at end of file