Skip to main content

A content translation framework for django integrated automatically in the normal ORM. Removes the pain of having to think about translations in a django project.

Project description

This project is yet another attempt at making model translations suck less in Django. It uses an automatically created Translations Model to store translatable fields in arbitrary languages with a foreign key to the main model.

Documentation for django-hvad can be found at http://django-hvad.readthedocs.org/.

This project replaces the obsolete django-nani package. It provides the same functionality, but does not affect the default queries: translated fields have to be activated by calling a specific method on the TranslationManager.

Feel free to join us at #django-hvad on irc.freenode.net for a chat

https://secure.travis-ci.org/KristianOellegaard/django-hvad.png?branch=master

Example

Normal.objects.all()

Returns all objects, but without any translated fields attached - this query is just the default django queryset and can therefore be used as usual.

Normal.objects.language().all()

Returns all objects as translated instances, but only the ones that are translated into the currect language. You can also specify which language to get, using e.g.

Normal.objects.language(“en”).all()

Features

  • Simple API

  • Predictable

  • Reliable

  • Versatile (can manipulate arbitrary languages without changing the DB layout)

  • Fast (few and simple queries)

  • High level (no custom SQL Compiler or other scary things)

Thanks to

Jonas Obrist (https://github.com/ojii) for making django-nani and for helping me with this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

django-hvad-0.4.1.zip (106.9 kB view details)

Uploaded Source

django-hvad-0.4.1.tar.gz (71.5 kB view details)

Uploaded Source

File details

Details for the file django-hvad-0.4.1.zip.

File metadata

  • Download URL: django-hvad-0.4.1.zip
  • Upload date:
  • Size: 106.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-hvad-0.4.1.zip
Algorithm Hash digest
SHA256 8613ce754a6e462721b8004fd0d19c2db461a64eb3c285b427d975b6157ac475
MD5 9645cfcc6e385936df8e709daf34233d
BLAKE2b-256 7c117b13998e3641128e09f2e858d0d3e6c69ebbb29d6a73f9833be52dd265c5

See more details on using hashes here.

Provenance

File details

Details for the file django-hvad-0.4.1.tar.gz.

File metadata

  • Download URL: django-hvad-0.4.1.tar.gz
  • Upload date:
  • Size: 71.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-hvad-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1bffa5409d6495272aa740102839c2786d5176a5ce610cc52bd6f8c06cb37dba
MD5 7457a2730460ae5668fa1b3d9581bbe5
BLAKE2b-256 6ba83d53edfd36700d0dca463a0d903df26ee3aacc71d2a6c26aef2650a6a5cf

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page