Skip to main content

A translations 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.

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

This project provides the same functionality as django-nani, but it as opposed to django-nani, this project does not affect the default queries, which means that everything will continue to work as it was before.

You have to activate the translated fields, by calling a specific method on the manager.

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

  • 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 Distribution

django-hvad-0.2.tar.gz (47.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for django-hvad-0.2.tar.gz
Algorithm Hash digest
SHA256 a69c8a42543f3e127745731354fa9f274108eb7e836d84188e3fe0c9623ea072
MD5 da187df3361fe8e0f5ea24c145e514a4
BLAKE2b-256 3906d48e0871fdc2d0631245781137406d835cb20da96850f2ffaf8bab474eb6

See more details on using hashes here.

Supported by

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