add donations and fix up some static

pull/3/head
lalanza808 5 years ago
parent 1a4822c730
commit ba4e8894ff

@ -146,6 +146,8 @@
<li><a href="{% static 'terms.txt' %}">Terms</a></li>
<li><a href="{% static 'faq.txt' %}">FAQ</a></li>
</ul>
<br>
<p class="text-muted" style="text-align:center;">Donations Accepted:<br> {{ site_meta.donation_address }}</p>
</div>
</footer>

@ -2,6 +2,6 @@ Congratulations {{ sale.item.owner }},
The sale of your item, "{{ sale.item.name }}" (#{{ sale.item.id }}), has concluded. The agreed upon bid price has been transferred to the payout address provided when posting the item.
In a few more minutes post-processing will complete, the platform will receive it's fees, and the sale, item, and bids will all be removed from the system.
In a few more minutes post-processing will complete, the platform will receive it's fees, and the sale, item, and bids will all be removed from the system. If your fees were waived, please consider donating to the development fund. The address is at the bottom of the {{ site_name }} home page.
Thanks for using {{ site_name }}!

@ -5,6 +5,8 @@ def inject_site_meta(request):
return {
'site_meta': {
'debug': settings.DEBUG,
'name': settings.SITE_NAME
'name': settings.SITE_NAME,
'donation_address': settings.DONATION_WALLET_ADDRESS,
'platform_address': settings.PLATFORM_WALLET_ADDRESS
}
}

@ -14,6 +14,7 @@ https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
"""
import os
from core.monero import AuctionWallet
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
@ -26,7 +27,7 @@ DEBUG = os.environ.get('DEBUG', False)
ALLOWED_HOSTS = str(os.environ['ALLOWED_HOSTS']).split(',')
ESCROW_PERIOD_DAYS = os.environ.get('ESCROW_PERIOD_DAYS', 30)
PLATFORM_FEE_PERCENT = os.environ.get('PLATFORM_FEE_PERCENT', 0)
PLATFORM_WALLET_ADDRESS = os.environ.get('PLATFORM_WALLET_ADDRESS', None)
# Application definition
@ -242,3 +243,14 @@ CORS_ORIGIN_WHITELIST = os.environ.get('CORS_ORIGIN_WHITELIST', [])
CORS_ORIGIN_REGEX_WHITELIST = [
r"^https://static\.\w+\.xmrauctions\.com$",
]
# Platform Wallets
aw = AuctionWallet()
platform_wallet_address = None
if aw.connected is True:
platform_wallet_address = str(aw.wallet.accounts[0].address())
PLATFORM_WALLET_ADDRESS = os.environ.get('PLATFORM_WALLET_ADDRESS', platform_wallet_address)
DONATION_WALLET_ADDRESS = os.environ.get('DONATION_ADDRESS', PLATFORM_WALLET_ADDRESS)