Thank you for your time, Constantine. 

I gave up on following this path. 

I threw away everything that I did on this matter, and I followed the steps 
of this link: http://django-haystack.readthedocs.io/en/v2.5.0/tutorial.html

It took me some time to understand, but now it is working fine.

Thank you.

Em sábado, 15 de outubro de 2016 04:43:21 UTC-3, Constantine Covtushenko 
escreveu:
>
> Hi Aline,
>
> I did not use Haystack but I am using ElastickSearch.
> I carefully read you post on StackOverflow and see that search form 
> returns author of the post without `pk` key defined.
>
> Did you check what is returned by ElastickSearch?
> May be your SearchForm returns exactly what Elastick stores in its index? 
> I mean that post returned by SearchForm not the same as Post model? It can 
> be dictionary or something?
>
> Sorry I do not have time to build test app to check my idea.
>
> You can easily set up a break point and check what are the posts inside 
> your `post_search` view function.
>
> Regards,
> Constantine C.
>
> On Sat, Oct 15, 2016 at 12:48 AM, Aline C. R. Souza <[email protected] 
> <javascript:>> wrote:
>
>> Hello everybody,
>>
>> I am having a issue using Django + Haystack + Elasticsearch to perform a 
>> website search.
>>
>> I made a question on StackOverflow, but I had no satisfatory answer.
>>
>> The problem is in this line:
>>
>> by <a href="{% url 'blog.posts_by_author' post.author.pk %}">{{ post.author 
>> }}</a>
>>
>> post.author.pk works well when called by several views, but it is not 
>> resolved when called by the search.
>>
>> There is another way to get the pk of the author of the post?
>>
>> The link of the StackOverflow question: 
>> http://stackoverflow.com/questions/40033039/noreversematch-error-using-haystack-elasticsearch
>>
>> Can someone help me? Please explain in details, because I am new in 
>> Django, and in haystack, elasticsearch...
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/fb151afb-35a8-4ac4-a9e4-69f4419568c1%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/fb151afb-35a8-4ac4-a9e4-69f4419568c1%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/63bae927-7d3c-4b5e-9355-a15937520e67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to