Esempio n. 1
0
 def blackholeCategory(self):
     try:
         return Category.objects.get(translations__title='BlackHole')
     except Category.DoesNotExist:
         cat = Category()
         cat.save()
         cat.translations.add(CategoryTranslation(title='BlackHole'))
         return cat
Esempio n. 2
0
 def blackholeCategory(self):
     try:
         return Category.objects.get(translations__title='BlackHole')
     except Category.DoesNotExist:
         cat = Category()
         cat.save()
         cat.translations.add(CategoryTranslation(title='BlackHole'))
         return cat
Esempio n. 3
0
 def _saveCategory(self, title, desc):
     c = Category()
     c.save()
     c.translations.add(CategoryTranslation(title=title, description=desc))
     return c
Esempio n. 4
0
 def _saveCategory(self, title, desc):
     c = Category()
     c.save()
     c.translations.add(CategoryTranslation(title=title, description=desc))
     return c