fix new task cron attributes and adding social media/contact info

pull/3/head
lance 5 years ago
parent fc2e876ce0
commit c4e79deb15

@ -7,7 +7,7 @@ from items.models import Item
logger = getLogger('django.server') logger = getLogger('django.server')
@periodic_task(crontab(minute='0', hours='0', days='*/2')) @periodic_task(crontab(minute='0', hour='0', day='*/2'))
def notify_seller_of_item_bids(): def notify_seller_of_item_bids():
items = Item.objects.all() items = Item.objects.all()
for item in items: for item in items:

@ -74,4 +74,22 @@
</div> </div>
</section> </section>
<section id="two" class="wrapper style3 align-center network-stats">
<div class="container">
<header>
<h2>Contact Me</h2>
</header>
<div class="row 100%">
<section class="12u 12u$(small)">
<p>Contact me at any of the locations below</p>
<ul>
{% for k,v in site_meta.social_media.items %}
<li><a href="{{ v.url }}" target="_blank"><i class="fa fa-{{ k }}"></i> {{ v.comment }}</a></li>
{% endfor %}
</ul>
</section>
</div>
</div>
</section>
{% endblock %} {% endblock %}

@ -9,6 +9,7 @@ def inject_site_meta(request):
'escrow_period': settings.ESCROW_PERIOD_DAYS, 'escrow_period': settings.ESCROW_PERIOD_DAYS,
'tip_address': settings.TIP_WALLET_ADDRESS, 'tip_address': settings.TIP_WALLET_ADDRESS,
'platform_address': settings.PLATFORM_WALLET_ADDRESS, 'platform_address': settings.PLATFORM_WALLET_ADDRESS,
'block_confirmations': settings.BLOCK_CONFIRMATIONS_RCV 'block_confirmations': settings.BLOCK_CONFIRMATIONS_RCV,
'social_media': settings.SOCIAL_MEDIA
} }
} }

@ -31,6 +31,28 @@ BLOCK_CONFIRMATIONS_RCV = os.environ.get('BLOCK_CONFIRMATIONS_RCV', 3)
BLOCK_EXPLORER = 'https://community.xmr.to/explorer/%s' BLOCK_EXPLORER = 'https://community.xmr.to/explorer/%s'
# Social
IRC_USER = os.environ.get('IRC_USER', 'lza_menace')
TWITTER_USER = os.environ.get('TWITTER_USER', 'lza_menace')
GITHUB_USER = os.environ.get('GITHUB_USER', 'lalanza808')
SOCIAL_MEDIA = {
'comment': {
'url': 'https://webchat.freenode.net/?room=#monero',
'comment': f'IRC (@{IRC_USER})'
},
'twitter': {
'url': f'https://twitter.com/{TWITTER_USER}',
'comment': f'@{TWITTER_USER}'
},
'github': {
'url': f'https://github.com/{GITHUB_USER}',
'comment': f'@{GITHUB_USER}'
}
}
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [