Skip to content

Commit

Permalink
Fix admin, enable more parler languages
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Posselt committed Jun 23, 2016
1 parent 4499d93 commit a47f6ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
10 changes: 4 additions & 6 deletions nextcloudappstore/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ class Meta:
unique_together = (('app_release', 'database', 'version_spec'),)

def __str__(self) -> str:
return '%s: %s >=%s, <=%s' % (self.app_release, self.database,
self.min_version,
self.max_version)
return '%s: %s %s' % (self.app_release, self.database,
self.version_spec)


class PhpExtension(Model):
Expand Down Expand Up @@ -241,6 +240,5 @@ class Meta:
unique_together = (('app_release', 'php_extension', 'version_spec'),)

def __str__(self) -> str:
return '%s: %s >=%s, <=%s' % (self.app_release.app, self.php_extension,
self.min_version,
self.max_version)
return '%s: %s %s' % (self.app_release.app, self.php_extension,
self.version_spec)
8 changes: 3 additions & 5 deletions nextcloudappstore/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
from django.conf.global_settings import LANGUAGES

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
Expand Down Expand Up @@ -148,11 +150,7 @@
USE_TZ = True

PARLER_LANGUAGES = {
1: (
{'code': 'en'},
{'code': 'de'},
{'code': 'fr'},
),
1: [{'code': code} for code, trans in LANGUAGES],
'default': {
'fallbacks': ['en'],
'hide_untranslated': False,
Expand Down

0 comments on commit a47f6ce

Please sign in to comment.