add published boolean
This commit is contained in:
parent
6aaa08b327
commit
454cb6741b
|
@ -1,6 +1,7 @@
|
|||
from django.db import models
|
||||
|
||||
class PadmaText(models.Model):
|
||||
published = models.BooleanField(default=False)
|
||||
date = models.DateField(null=True)
|
||||
title = models.CharField(max_length=512)
|
||||
slug = models.SlugField()
|
||||
|
|
|
@ -8,5 +8,5 @@ def text(request, slug):
|
|||
return render_to_response("text_embed.html", {'text': text})
|
||||
|
||||
def texts(request):
|
||||
texts = PadmaText.objects.all()
|
||||
texts = PadmaText.objects.filter(published=True)
|
||||
return render_to_response("text_list.html", {'texts': texts})
|
||||
|
|
Loading…
Reference in New Issue
Block a user