This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from haystack.forms import SearchForm | |
| . | |
| . | |
| class RtSearchForm(SearchForm): | |
| def search(self): | |
| if hasattr(self,'cleaned_data') and self.cleaned_data['q']: | |
| self.cleaned_data['q']=self.cleaned_data['q'].encode('translit/one/ascii', 'replace') | |
| sqs = super(RtSearchForm, self).search() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from haystack.views import SearchView | |
| . | |
| . | |
| . | |
| urlpatterns += patterns('haystack.views', | |
| url(r'^$', SearchView, name='haystack_search'), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from haystack.views import SearchView | |
| from django.contrib.auth.decorators import login_required | |
| from apps.informationgathering.forms import RtSearchForm | |
| . | |
| . | |
| . | |
| urlpatterns += patterns('haystack.views', | |
| url(r'^$', login_required(SearchView( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ object.assignednumber }} | |
| {{ object.holderrightenterprise.nit }} | |
| {{ object.territory }} | |
| {{ object.people }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export MYENV=~/.virtualenvs/tr | |
| export LOCALPYTHON=/usr/lib/python2.7 | |
| ln -s $LOCALPYTHON/dist-packages/xapian/__init__.py $MYENV/lib/python2.7/site-packages/xapian.py | |
| ln -s $LOCALPYTHON/dist-packages/xapian/_xapian.so $MYENV/lib/python2.7/site-packages/ | |
| if [ ! -f $MYENV/lib/python2.7/site-packages/haystack/backends/xapian_backend.py ] | |
| then | |
| ln -s $MYENV/lib/python2.7/site-packages/xapian_backend.py $MYENV/lib/python2.7/site-packages/haystack/backends/ | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from haystack.indexes import RealTimeSearchIndex | |
| from haystack.indexes import CharField | |
| from haystack.indexes import RealTimeSearchIndex | |
| from haystack.indexes import CharField | |
| from haystack.indexes import MultiValueField | |
| from haystack import site | |
| from apps.informationgathering.models import RR | |
NewerOlder