django-thema
A Django application that provides EDItEUR Thema categories. It supplies translation to all languages EDItEUR supports, so if you are using Django’s internationalization in your project, you will also get translation.
Requirements
This application requires:
django
mock
polib
xlrd
Installation
Install the application from Pypi:
$ pip install django-thema
Add the application to your Django project:
INSTALLED_APPS = [
...
'thema',
...
]
Migrate the application
$ ./manage.py migrate thema
You should populate the model with the data in EDItEUR database, for this use the command populate_thema_categories
$ ./manage.py populate_thema_categories
Also, please make sure the tests passed smoothly
$ ./manage.py test thema
If any test fails, then you could end up with missing data in your database or malfunction of the application.
How it works
django-thema offers a model ThemaCategory, each instance is a Thema category.
...
>>> from thema.models import ThemaCategory
>>> thema_aba = ThemaCategory.objects.get(code='ABA')
>>> thema_aba.header
'Theory of art'
...
Getting translation:
...
>>> from django.utils.translation import activate
>>> activate('es')
>>> thema_aba.local_header
'Teoría del arte'
>>> activate('da')
>>> thema_aba.local_header
'Kunstteori'
...
Note: the translation will work only if you have enabled Django’s internationalization in your project.
Getting the parent category:
...
>>> thema_aba.parent
<ThemaCategory: AB>
...
Supported languages
The application supports the languages covered by EDItEUR:
Arabic
Danish
English
Spanish
French
German
Hungarian
Italian
Japanese
Lithuanian
Norwegian
Polish
Portuguese
Swedish
Turkish
We don’t do any translation, we just use the data provided by EDItEUR, so if you find a missing translation or a translation error, please contact EDItEUR directly.
Maintenance
To submit bugs, feature requests, submit patches, please use the official repository.
Copyright and licensing information
BSD License 2.0, 3-clause license.
Metadata
Release files for django-thema 1.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-thema-1.2.8.tar.gz | 20.8 MB | Without provenance | Details for django-thema-1.2.8.tar.gz |
Release files / django-thema-1.2.8.tar.gz
| Download URL | django-thema-1.2.8.tar.gz |
|---|---|
| Size | 20.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8618b80f84b8a538255b9bb907810f81a85c2c43eb7d47c723c06b49ae5a4b59
|
|
BLAKE2b-256 checksum How to use checksums |
0af59b11dcac804ce2ad62a59057b8cba06d68a5b9da14a55791f79f84ba933c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-thema 1.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.