# FIXTURES # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#fixture-dirs FIXTURE_DIRS = (str(APPS_DIR / "fixtures"), ) # LOGGING # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#logging # See https://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. # Money Setup # ------------------------------------------------------------------------------ EEI = moneyed.add_currency(code="EEI", numeric="068", name="Eve Echoes ISK", countries=("CHINA", )) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition("default", EEI, prefix=u"Ƶ ") _FORMATTER.add_formatting_definition( "es_BO", group_size=3, group_separator=",", decimal_point=".", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN,
EMAIL_USE_TLS = True EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = "smtp.gmail.com" EMAIL_HOST_USER = "******" EMAIL_HOST_PASSWORD = os.environ.get('gmail-password') EMAIL_PORT = 587 STATIC_PRECOMPILER_USE_CACHE = True STATICFILES_DIRS = [] else: try: from .local_settings import * except: warnings.warn("local_settings.py file is not present. It " "could contain database settings for postgres") # django-money configuration import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN LTC = moneyed.add_currency('LTC', '068', 'Litecoin', ()) _FORMATTER.add_sign_definition('default', LTC, prefix=u'LTC ') CURRENCIES = ['LTC'] CURRENCIES_CHOICE = [('LTC', 'LTC')] AUTOCOMPLETE_LENGTH = 5
TIME_ZONE = 'Africa/Dar_es_Salaam' USE_I18N = True USE_L10N = True USE_TZ = False # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.10/howto/static-files/ STATIC_URL = '/static/' TZS = moneyed.add_currency(code='TZS', numeric='068', name='Tanzanian shilling', countries=('TANZANIA', )) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition('default', TZS, prefix=u'Tshs. ') _FORMATTER.add_formatting_definition('es_TZ', group_size=3, group_separator=",", decimal_point=".", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN)
MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' EMAIL_PORT = 587 LOGIN_URL = '/user/login/' import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN UAH = moneyed.add_currency(code='UAH', numeric='068', name='Украинская гривна', countries=('UKRAINE', )) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition('default', UAH, prefix=u'грв. ') _FORMATTER.add_formatting_definition('ua_UA', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN)
USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ STATIC_URL = "/static/" STATIC_ROOT = env("STATIC_ROOT", default=root("static.run")) STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.AppDirectoriesFinder", ] # Django-Money: restrict list of possible currencies # See also: https://github.com/django-money/django-money#adding-a-new-currency # XBT is unofficial but ISO 4217-conformant code for Bitcoin BTC = moneyed.add_currency("XBT", "Nil", "Bitcoin", []) _FORMATTER.add_sign_definition("default", BTC, suffix=" BTC") CURRENCIES = ("USD", "EUR", "PHP", "XBT") # Django REST Framework configuration REST_FRAMEWORK = { "DEFAULT_RENDERER_CLASSES": ( # Let's omit BrowsableAPIRenderer and use CoreAPI tooling instead. "rest_framework.renderers.JSONRenderer", ), "DEFAULT_PAGINATION_CLASS": "api_demo.pagination.DefaultPagination", }
USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/' _sign("DEFAULT", moneyed.ARS, prefix='$') _sign("DEFAULT", moneyed.USD, prefix='US$') moneyed.add_currency('ARS', '032', 'Peso Argentino', ['ARGENTINA']) CURRENCIES = ('ARS', 'USD') TINYMCE_DEFAULT_CONFIG.update({ 'toolbar': 'undo redo | ' 'formatselect | ' 'bold italic underline strikethrough | ' 'fontselect fontsizeselect forecolor backcolor | ' 'alignleft aligncenter alignright alignjustify | ' 'bullist numlist outdent indent | ' 'removeformat | ' 'help', })
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import moneyed from decimal import ROUND_HALF_EVEN from moneyed.localization import _FORMATTER BYN = moneyed.add_currency(code='BYN', numeric='933', name='Belarusian ruble', countries=('BELARUS', )) _FORMATTER.add_sign_definition('default', BYN, suffix=u'Br') _FORMATTER.add_formatting_definition('by_BY', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN)
'django.contrib.sessions', 'django.contrib.sites', 'djmoney', 'djmoney.contrib.exchange', 'reversion', 'tests.testapp' ] SITE_ID = 1 SECRET_KEY = 'foobar' USE_L10N = True _FORMATTER.add_sign_definition('pl_PL', moneyed.PLN, suffix=' zł') _FORMATTER.add_sign_definition(DEFAULT, moneyed.PLN, suffix=' zł') _FORMATTER.add_formatting_definition( 'pl_PL', group_size=3, group_separator=' ', decimal_point=',', positive_sign='', trailing_positive_sign='', negative_sign='-', trailing_negative_sign='', rounding_method=ROUND_HALF_EVEN ) moneyed.add_currency("USDT", "000", "Tether", None) OPEN_EXCHANGE_RATES_APP_ID = 'test' FIXER_ACCESS_KEY = 'test'
For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN BRL = moneyed.add_currency( code='R$', numeric='999', name='Real', countries=('BRASIL', ) ) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition( 'R$', BRL, suffix='R$. ' ) _FORMATTER.add_formatting_definition( 'pt_BR', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="",
# Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), ) STATIC_URL = '/static/' # configuracoes pra usar django-money import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN BRL = moneyed.add_currency( code='BRL', numeric='068', name='Reais', countries=('BRAZIL',) ) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition( 'default', BRL, prefix=u'R$ ' ) _FORMATTER.add_formatting_definition( 'pt_BR', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="",
# Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), ] MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') BSS = moneyed.add_currency(code='BSS', numeric='068', name='Bolivar Soberano', countries=('VENEZUELA', )) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition('default', BSS, prefix=u'Bs.S ') _FORMATTER.add_formatting_definition('es', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN)
USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.10/howto/static-files/ STATIC_ROOT = os.path.join(BASE_DIR, 'static/') STATIC_URL = '/static/' ## moneyd config import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN BRL = moneyed.add_currency(code='BRL', numeric='068', name='Real', countries=('BRAZIL', )) # Currency Formatter will output R$ 2.000,00 _FORMATTER.add_sign_definition('default', BRL, prefix=u'R$ ') _FORMATTER.add_formatting_definition('pt_BR', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN)
USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ STATIC_URL = '/static/' AUTH_USER_MODEL = 'api.User' PERCENT_CURRENCY = 'PERCENT' CURRENCIES = ('USD', PERCENT_CURRENCY) PERCENT = moneyed.add_currency(code=PERCENT_CURRENCY, numeric='999', name='Percent', countries=('Earth', )) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition('default', PERCENT, prefix=u'%') _FORMATTER.add_formatting_definition('eh_EH', group_size=3, group_separator="", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_DOWN)
S3_SECRET_ACCESS_KEY = os.environ.get("S3_SECRET_ACCESS_KEY") EMAIL_BACKEND = os.environ.get("EMAIL_BACKEND") EMAIL_HOST = os.environ.get("EMAIL_HOST") EMAIL_PORT = os.environ.get("EMAIL_PORT") EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD") EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS") EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL") # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) KRW = moneyed.add_currency( code='KRW', numeric='410', name='KOREA (THE REPUBLIC OF)', countries=('REPUBLIC OF KOREA', ) ) OPEN_EXCHANGE_RATES_APP_ID = os.environ.get("OPEN_EXCHANGE_RATES_APP_ID") OPEN_EXCHANGE_RATES_URL = 'https://openexchangerates.org/api/latest.json?symbols=KRW,EUR,JPY' _FORMATTER.add_sign_definition( 'default', moneyed.KRW, suffix=u' KRW' ) _FORMATTER.add_formatting_definition( 'es_KO', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="",
USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/dev/howto/static-files/ MEDIA_ROOT = 'assets/' MEDIA_URL = '/backend_media/' LOGOUT_REDIRECT_URL = '/' STATIC_URL = '/backend_static/' STATIC_ROOT = 'static' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), ] ETH = moneyed.add_currency(code='ETH', numeric='ETH', name='Ethereum') BNB = moneyed.add_currency(code='BNB', numeric='BNB', name='Binance Coin') MATIC = moneyed.add_currency(code='MATIC', numeric='MATIC', name='Matic') CURRENCIES = ('USD', 'ETH', 'BNB', 'MATIC') CURRENCY_CHOICES = [('USD', 'USD'), ('ETH', 'ETH'), ('BNB', 'BNB'), ('MATIC', 'MATIC')] CURRENCY_CODE_MAX_LENGTH = 5 EXCHANGE_BACKEND = 'ad_source.exchange.backends.CryptoCompareBackend'
# DJANGO ALLAUTH AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend', ] SITE_ID = 1 # CRISPY FORM CRISPY_TEMPLATE_PACK = 'bootstrap4' LOGIN_REDIRECT_URL = '/' # ADD NEW CURENCY IDN = moneyed.add_currency( code='IDN', numeric='068', name='Rupiah', countries=('INDONESIA', ) ) _FORMATTER.add_sign_definition( 'default', IDN, prefix=u'Bs. ' ) _FORMATTER.add_formatting_definition( 'es_BO', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN
import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN BOB = moneyed.add_currency( code='Rp.', numeric='069', name='Indonesia Rupiah', countries=('INDONESIA', ) ) # Currency Formatter will output 2.000,00 Bs. _FORMATTER.add_sign_definition( 'default', BOB, prefix=u'Rp. ' ) _FORMATTER.add_formatting_definition( 'es_BO', group_size=3, group_separator=".", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN)
"djmoney", "djmoney.contrib.exchange", "reversion", "tests.testapp", ] SITE_ID = 1 SECRET_KEY = "foobar" USE_L10N = True _FORMATTER.add_sign_definition("pl_PL", moneyed.PLN, suffix=" zł") _FORMATTER.add_sign_definition(DEFAULT, moneyed.PLN, suffix=" zł") _FORMATTER.add_formatting_definition( "pl_PL", group_size=3, group_separator=" ", decimal_point=",", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN, ) moneyed.add_currency("USDT", "000", "Tether", None) OPEN_EXCHANGE_RATES_APP_ID = "test" FIXER_ACCESS_KEY = "test"
For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os import moneyed from moneyed.localization import _FORMATTER from decimal import ROUND_HALF_EVEN # Setup angolan money AOA = moneyed.add_currency(code='AOA', numeric=973, name='Kwanza', countries=('ANGOLA', )) _FORMATTER.add_sign_definition('default', AOA, prefix=u'kz') _FORMATTER.add_formatting_definition('pt_AO', group_size=3, group_separator=",", decimal_point=".", positive_sign="", trailing_positive_sign="", negative_sign="-", trailing_negative_sign="", rounding_method=ROUND_HALF_EVEN) CURRENCIES = ('AOA', )