Hi Guys, i hope someone can help me figuring out what am i doing wrong, or 
where is the problem. 

I having trouble with the search_form tag, i have read the documentation, 
search trough the mailimg list and try to understand this commit 
https://github.com/stephenmcd/mezzanine/commit/d67d4a132cbcabdfc2d9ed8c275225aa575386b8
 
but i just cant figure why it dont work as expected.

I have 2 searchable models, that don't inherit from displayable. I have a 
defaults.py that looks like this:

from mezzanine.conf import register_setting

register_setting(
    name="SEARCH_MODEL_CHOICES",
    description="Quita las paginas de la busqueda",
    editable=False,
    default=( "pages.Page", "blog.BlogPost", "marca.Item", "solucion.Item")
)

I want to perform a global search on all of the models whithout the user 
picking one of them, so i try using {% search_form %} but it dont work as i 
expected:
it only search on the page & blog models, and the url seems like this:
/search/?q=hola&type=

So i try to use the tag whith the "all" parameter
 {% search_form "all" %} 
and i can see the list that have all the searchable models, including 
"marcas" and "soluciones"

I can perfectly perform search if i choose one model, for example if i 
select Marcas from the list the results are ok and the url seems like this:
 /search/?q=hola&type=marca.Item

the same to other selected models, but  when i choose all, it only search 
on the page & blog models!!!¡?¡?, and the url seems like this:
/search/?q=hola&type=

I try to perform a search like this directly to the url and it works:
/search/?q=hola&type=marca.item&type=solucion.item

So i thought that i can use the search form in another way {% search_form 
"marca.Item solucion.Item" %} but i only get page and blog results, the 
urls again, seems like this:
/search/?q=hola&type=

Finally i try to set search form only with one model like this {% 
search_form "marca.Item" %} and it works...

I want to perform a global search on all of the models whithout the user 
picking one of them, how can i do this? what am i doing wrong? 

I will appreciate any advice or referrence on this.

Thanks for reading!!





-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to