Ben Sturmfels
531a97a3c9
The directory nesting is unnecessary here and confusing to navigate. I've moved all apps to the project subdirectory, currently called "www", but soon to be renamed "conservancy". I've also moved manage.py to the top-level directory.
16 lines
371 B
Python
16 lines
371 B
Python
from datetime import datetime
|
|
|
|
from django.shortcuts import render
|
|
|
|
from ..blog.models import Entry
|
|
|
|
|
|
def index(request):
|
|
filters = {
|
|
'pub_date__lte': datetime.now(),
|
|
'tags__slug': 'ContractPatch',
|
|
}
|
|
context = {
|
|
'blog_entries': Entry.objects.filter(**filters)[:3],
|
|
}
|
|
return render(request, "contractpatch/index.html", context)
|