Skip to content

Commit

Permalink
Merge pull request #143 from meomancer/142
Browse files Browse the repository at this point in the history
fix draft people shown on home page
  • Loading branch information
meomancer authored Sep 19, 2016
2 parents 527b6ba + d2efe0b commit 62071d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_project/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
from django.core import serializers
from django.http import HttpResponse
from mezzanine_people.models import Person
from mezzanine.core.models import CONTENT_STATUS_PUBLISHED


def get_all_people(request):
data = serializers.serialize("json", Person.objects.all().order_by('order'))
data = serializers.serialize(
"json",
Person.objects.filter(status=CONTENT_STATUS_PUBLISHED).order_by('order'))
return HttpResponse(json.dumps(data), content_type="application/json")

0 comments on commit 62071d5

Please sign in to comment.