Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/f/e/FeinCMS-1.9.3/feincms/module/extensions/translations.py   FeinCMS(Download)
 
from feincms import extensions, settings
from feincms.translations import is_primary_language
from feincms._internal import monkeypatch_method, monkeypatch_property
 
        def available_translations(self):
            if not self.id:  # New, unsaved pages have no translations
                return []
            if is_primary_language(self.language):
                return self.translations.all()
        def get_original_translation(self, *args, **kwargs):
            if is_primary_language(self.language):
                return self
            if self.translation_of:
                return self.translation_of

src/f/e/feincms-HEAD/feincms/module/extensions/translations.py   feincms(Download)
 
from feincms import extensions, settings
from feincms.translations import is_primary_language
from feincms._internal import monkeypatch_method, monkeypatch_property
 
        def available_translations(self):
            if not self.id:  # New, unsaved pages have no translations
                return []
            if is_primary_language(self.language):
                return self.translations.all()
        def get_original_translation(self, *args, **kwargs):
            if is_primary_language(self.language):
                return self
            if self.translation_of:
                return self.translation_of