Use settings to control youtube live conference
This commit is contained in:
parent
7cdd27119c
commit
d2a3fcce63
@ -147,3 +147,5 @@ STATIC_URL = '/static/'
|
|||||||
|
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||||
MEDIA_URL = '/media/'
|
MEDIA_URL = '/media/'
|
||||||
|
|
||||||
|
YOUTUBE_CONFERENCE = 'https://www.youtube.com/embed/m2YpX4Fma2c'
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
{% block head %}
|
{% block head %}
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
// Show modal for live youtube confrence
|
// Show modal for live youtube conference
|
||||||
// $('#liveModal').modal('show')''
|
{% if youtube %}
|
||||||
|
$('#liveModal').modal('show');
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
$('#top').click(function() {
|
$('#top').click(function() {
|
||||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||||
@ -218,6 +220,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if youtube %}
|
||||||
<div id="liveModal" class="modal" tabindex="-1" role="dialog">
|
<div id="liveModal" class="modal" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -228,7 +231,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<iframe width="100%" height="400px" src="" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
<iframe width="100%" height="400px" src="{{ youtube }}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
@ -236,4 +239,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -14,7 +14,7 @@ from OACPL import settings
|
|||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
attorneys = Attorney.objects.filter(front_page=True).order_by('order')
|
attorneys = Attorney.objects.filter(front_page=True).order_by('order')
|
||||||
return render(request, 'index.html', {'attorneys': attorneys, 'contact': settings.EMAIL_CONTACT})
|
return render(request, 'index.html', {'attorneys': attorneys, 'contact': settings.EMAIL_CONTACT, 'youtube': settings.YOUTUBE_CONFERENCE})
|
||||||
|
|
||||||
|
|
||||||
def contact(request):
|
def contact(request):
|
||||||
|
Loading…
Reference in New Issue
Block a user