Git Product home page Git Product logo

django-hvad's Introduction

django-hvad

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.

Warning

django-hvad is still in beta, please use it with caution and report any bug(s) you might encounter.

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

image

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.

django-hvad's People

Contributors

akx avatar andialbrecht avatar beniwohli avatar bradenmacdonald avatar clelland avatar evildmp avatar eyvoro avatar krisb78 avatar kristianoellegaard avatar ojii avatar rasca avatar shaib avatar sphericalhorse avatar stefanfoulis avatar superdmp avatar

Watchers

 avatar  avatar

Forkers

adoora-system

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.