mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
43b3a67b11
commit
8b853014c5
|
@ -24,7 +24,7 @@ from utils import isPGPEncrypted
|
||||||
from utils import containsPGPPublicKey
|
from utils import containsPGPPublicKey
|
||||||
from utils import acct_dir
|
from utils import acct_dir
|
||||||
from utils import isfloat
|
from utils import isfloat
|
||||||
from utils import getCurrencies
|
from utils import get_currencies
|
||||||
from utils import removeHtml
|
from utils import removeHtml
|
||||||
from petnames import getPetName
|
from petnames import getPetName
|
||||||
from session import downloadImage
|
from session import downloadImage
|
||||||
|
@ -1221,7 +1221,7 @@ def limitRepeatedWords(text: str, maxRepeats: int) -> str:
|
||||||
def getPriceFromString(priceStr: str) -> (str, str):
|
def getPriceFromString(priceStr: str) -> (str, str):
|
||||||
"""Returns the item price and currency
|
"""Returns the item price and currency
|
||||||
"""
|
"""
|
||||||
currencies = getCurrencies()
|
currencies = get_currencies()
|
||||||
for symbol, name in currencies.items():
|
for symbol, name in currencies.items():
|
||||||
if symbol in priceStr:
|
if symbol in priceStr:
|
||||||
price = priceStr.replace(symbol, '')
|
price = priceStr.replace(symbol, '')
|
||||||
|
|
2
utils.py
2
utils.py
|
@ -3043,7 +3043,7 @@ def isGroupAccount(base_dir: str, nickname: str, domain: str) -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def getCurrencies() -> {}:
|
def get_currencies() -> {}:
|
||||||
"""Returns a dictionary of currencies
|
"""Returns a dictionary of currencies
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -15,7 +15,7 @@ from utils import getDomainFromActor
|
||||||
from utils import getMediaFormats
|
from utils import getMediaFormats
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
from utils import acct_dir
|
from utils import acct_dir
|
||||||
from utils import getCurrencies
|
from utils import get_currencies
|
||||||
from utils import get_category_types
|
from utils import get_category_types
|
||||||
from webapp_utils import getBannerFile
|
from webapp_utils import getBannerFile
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
|
@ -482,7 +482,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
||||||
extraFields += '<br>'
|
extraFields += '<br>'
|
||||||
extraFields += \
|
extraFields += \
|
||||||
'<label class="labels">' + translate['Currency'] + '</label><br>\n'
|
'<label class="labels">' + translate['Currency'] + '</label><br>\n'
|
||||||
currencies = getCurrencies()
|
currencies = get_currencies()
|
||||||
extraFields += ' <select id="themeDropdown" ' + \
|
extraFields += ' <select id="themeDropdown" ' + \
|
||||||
'name="itemCurrency" class="theme">\n'
|
'name="itemCurrency" class="theme">\n'
|
||||||
currencyList = []
|
currencyList = []
|
||||||
|
@ -547,7 +547,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
||||||
extraFields += '<br>'
|
extraFields += '<br>'
|
||||||
extraFields += \
|
extraFields += \
|
||||||
'<label class="labels">' + translate['Currency'] + '</label><br>\n'
|
'<label class="labels">' + translate['Currency'] + '</label><br>\n'
|
||||||
currencies = getCurrencies()
|
currencies = get_currencies()
|
||||||
extraFields += ' <select id="themeDropdown" ' + \
|
extraFields += ' <select id="themeDropdown" ' + \
|
||||||
'name="itemCurrency" class="theme">\n'
|
'name="itemCurrency" class="theme">\n'
|
||||||
currencyList = []
|
currencyList = []
|
||||||
|
|
Loading…
Reference in New Issue