2016-11-28 19:53:27 +00:00
|
|
|
from datetime import datetime
|
|
|
|
|
2023-10-19 22:44:24 +00:00
|
|
|
from django.shortcuts import render
|
|
|
|
|
|
|
|
from ..blog.models import Entry
|
|
|
|
|
|
|
|
|
2016-11-28 19:53:27 +00:00
|
|
|
def index(request):
|
|
|
|
filters = {
|
|
|
|
'pub_date__lte': datetime.now(),
|
|
|
|
'tags__slug': 'ContractPatch',
|
|
|
|
}
|
|
|
|
context = {
|
2023-10-19 22:44:24 +00:00
|
|
|
'blog_entries': Entry.objects.filter(**filters)[:3],
|
2016-11-28 19:53:27 +00:00
|
|
|
}
|
2023-10-19 22:44:24 +00:00
|
|
|
return render(request, "contractpatch/index.html", context)
|