2nd Django Friends Meetup, 2013-11-21
PocketScience GmbH, NOUS
Wissensmanagement GmbH,
Stephan Pötschner, Florian Demmer
www.staatsoperlive.com
june : concept
july - september : development
mid october : go live
https://www.staatsoperlive.com
Am 27. Oktober wurde die erste Staatsopern-Produktion live auf die Computer übertragen.
Per Streaming im Internet konnte man den „Rosenkavalier“ von Richard Strauss verfolgen. Über 350 Opernfans zahlten dafür je 14 Euro und klickten sich in die Vorstellung.
Jeder dritte Zuseher vor dem Computer stammte aus Österreich.
model for data in multiple languages
class News(models.Model):
title = models.CharField() # default, "no language"?
title_en = models.CharField(blank=True, null=True)
title_es = models.CharField(blank=True, null=True)
class News(models.Model):
title = models.CharField()
class NewsTranslation(models.Model):
base_obj = models.ForeignKey(News, related_name='translations')
language = models.CharField(max_length=2)
title = models.CharField()
yes, lots...
https://github.com/Yaco-Sistemas/django-transmeta
class Book(models.Model): __metaclass__ = TransMeta
class Meta: translate = ('name', 'description')
https://github.com/zmathew/django-linguo
class Product(MultilingualModel):
objects = MultilingualManager()
class Meta: translate = ('name', 'description')
https://github.com/deschler/django-modeltranslation
class NewsTranslationOptions(TranslationOptions): fields = ('title', 'text',) translator.register(News, NewsTranslationOptions)
https://github.com/juanpex/django-model-i18n
class PollTranslation(translator.ModelTranslation): fields = ('title',) translator.register(Poll, PollTranslation)
https://github.com/KristianOellegaard/django-hvad
class DjangoApplication(TranslatableModel):
name = models.CharField(max_length=255, unique=True)
author = models.CharField(max_length=255)
translations = TranslatedFields(
description = models.TextField(),
description_author = models.CharField(max_length=255),
)
the problem?
class BookTranslation(
get_translation_model(Book, "book")): name = models.CharField()
TranslatableModel.get_translation(
language=None, fallback=True)
class BookTranslation(MultilingualTranslation): class Meta: unique_together = ('parent', 'language_code')
parent = models.ForeignKey('Book',
related_name='translations') class Book(MultilingualModel):
[...]
book = Book(ISBN="1234567890") book_en = BookTranslation(language_code='en')
https://github.com/robcharlwood/django-mothertongue
class Book(MothertongueModelTranslate):
title = models.CharField()
translation_set = 'booktranslation_set' translated_fields = ['title']
book = Book(ISBN="1234567890") book.title = "Deutscher Titel" translation.activate("en") book.title = "English Title"
sorry, no clear recommendation
additional colums: django-modeltranslation
related table: django-hvad
gmail, twitter, github, 500px, flickr, ...