Sanj
12 years ago
9 changed files with 60 additions and 10 deletions
@ -0,0 +1,12 @@ |
|||
from haystack.indexes import * |
|||
from haystack import site |
|||
from models import EmailerIssue |
|||
|
|||
|
|||
class EmailerIssueIndex(SearchIndex): |
|||
text = CharField(document=True, use_template=True) |
|||
title = CharField(model_attr='title') |
|||
date = DateField(model_attr='date') |
|||
|
|||
site.register(EmailerIssue, EmailerIssueIndex) |
|||
|
@ -0,0 +1,12 @@ |
|||
from haystack.indexes import * |
|||
from haystack import site |
|||
from models import Page |
|||
|
|||
|
|||
class PageIndex(SearchIndex): |
|||
text = CharField(document=True, use_template=True) |
|||
title = CharField(model_attr='title') |
|||
|
|||
|
|||
site.register(Page, PageIndex) |
|||
|
@ -0,0 +1,8 @@ |
|||
{{ object.title }} |
|||
{% for article in object.emailerarticle_set.all %} |
|||
{{ article.title }} |
|||
{{ article.subtitle }} |
|||
{{ article.author }} |
|||
{{ article.author_bio }} |
|||
{{ article.text }} |
|||
{% endfor %} |
@ -0,0 +1,2 @@ |
|||
{{ object.title }} |
|||
{{ object.text }} |
Loading…
Reference in new issue