merge
This commit is contained in:
@@ -4,11 +4,19 @@ from django.utils import timezone
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
from .models import JobPosting
|
from .models import JobPosting
|
||||||
|
from posts.models import Post
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
jobPost_cutoff = timezone.now().date() - timedelta(30) # 30days from now
|
job_postings_cutoff = timezone.now().date() - timedelta(30) # 30days from now
|
||||||
|
job_postings = JobPosting.all_jobPosting.filter(publishDate__gt=job_postings_cutoff)
|
||||||
|
bb_info = Post.objects.filter(slug='blackboard').first()
|
||||||
|
bb_empty = Post.objects.filter(slug='blackboard-empty').first()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"jobPostings": JobPosting.all_jobPosting.filter(publishDate__gt=jobPost_cutoff),
|
"job_postings": job_postings,
|
||||||
|
"bb_info": bb_info,
|
||||||
|
"bb_empty": bb_empty,
|
||||||
}
|
}
|
||||||
|
|
||||||
return render(request, 'blackboard/index.html', context)
|
return render(request, 'blackboard/index.html', context)
|
||||||
|
|||||||
@@ -5,9 +5,17 @@
|
|||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
<h1>Blackboard</h1>
|
<h1>Blackboard</h1>
|
||||||
|
|
||||||
|
{% if bb_info %}
|
||||||
|
{{ bb_info.body|safe }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if bb_empty and not job_postings %}
|
||||||
|
{{ bb_empty.body|safe }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="grid-x grid-margin-x">
|
||||||
{% for job in jobPostings %}
|
{% for job in job_postings %}
|
||||||
{% include 'blackboard/partials/_jobPosting.html' %}
|
{% include 'blackboard/partials/_show_job_posting.html' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ footer {
|
|||||||
<div class="grid-y" style="height: 100%;">
|
<div class="grid-y" style="height: 100%;">
|
||||||
|
|
||||||
<div class="cell small-6 medium-9 large-9">
|
<div class="cell small-6 medium-9 large-9">
|
||||||
<a href="{% url 'posts.show' 'impressum'%}" style="color: white">Impressum</a>
|
<a href="{% url 'posts.show' 'impressum' %}" style="color: white">Impressum</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-6 medium-3 large-3 padding-bottom-2">
|
<div class="cell small-6 medium-3 large-3 padding-bottom-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user