Renamed the get_default() method to default() in Language in the Mia core application.

This commit is contained in:
依瑪貓 2020-07-14 22:12:17 +08:00
parent e895de3abc
commit ef4c8ea2ae

View File

@ -53,7 +53,7 @@ class Language:
self.is_default = (language == settings.LANGUAGE_CODE)
@staticmethod
def get_default():
def default():
return Language(settings.LANGUAGE_CODE)
@ -74,7 +74,7 @@ def get_multi_language_attr(model, name):
return title
if title is not None:
return title
return getattr(model, name + "_" + Language.get_default().db)
return getattr(model, name + "_" + Language.default().db)
class UrlBuilder: