Thanks a lot for the details Adam.  We'll take a look and if we come up 
with a different solution I'll pass it along.

On Thursday, May 19, 2016 at 10:20:58 AM UTC-7, Adam Cox wrote:
>
> Hi Andy,
>
> Kind of, but behind the scenes it's pretty much as it was when I started 
> this thread. I would redo it in a different way if I had the time now.
>
> Here's what the user sees http://afrh.adamcfcox.com/search, which is good 
> enough for now.
>
> For a little more detail: dictionary of search urls created here 
> https://github.com/mradamcox/afrh/blob/master/afrh/models/browse.py, pull 
> the dictionary through context_processors.py here 
> https://github.com/mradamcox/afrh/blob/master/afrh/utils/context_processors.py#L123,
>  
> and then replace the saved searches with template tags that reference this 
> dictionary here 
> https://github.com/mradamcox/afrh/blob/master/afrh/templates/views/saved-searches.htm
> .
>
> Let me know if you have any ideas or go another route.  At this point I 
> have a lot more experience making ES queries with python, so I would change 
> the whole browse.py thing around, and probably just add it to 
> views/search.py (it doesn't really belong in models/ at all anyway).
>
> Adam
>
> On Thu, May 19, 2016 at 11:01 AM, Andy Graham <[email protected] 
> <javascript:>> wrote:
>
>> Hi Adam,
>> Were you ever able to figure out a solution to this?  Sounds like an 
>> interesting customization and was wondering how you progressed.  Thanks.
>>
>> Andy
>>
>>
>> On Monday, February 1, 2016 at 8:30:31 AM UTC-8, Adam Cox wrote:
>>>
>>> Hello all, for my current project, one very desirable customization is 
>>> the addition of some sort of "database browsing" component.  Seeing it as 
>>> peripherally related to Richard Fielding's inquiry, I worked on this a lot 
>>> last week, and have something that basically works (you can see here 
>>> <http://afrh.adamcfcox.com/search>) but could use a little help...
>>>
>>> Behind the scenes, I've added a browse.py 
>>> <https://github.com/mradamcox/afrh/blob/master/afrh/models/browse.py> 
>>> file that will take an E55 node and construct a set of termFilter strings 
>>> from all of the concepts in that domain.  Then that information is sent to 
>>> the templates through the context processor.  (I was originally thinking of 
>>> sending it to .js and using ko but did not have the fortitude to muscle 
>>> through that.)  Now, I've hacked together a url using those term filter 
>>> strings and a new setting for the local domain, which yields this: 
>>> href="http://{{local_domain}}/search?page=1&;
>>> termFilter={{contents.term_filter}}" 
>>> <https://github.com/mradamcox/afrh/blob/master/afrh/templates/views/saved-searches.htm#L19>.
>>>  
>>> However, this is not the Django way, so I'm wondering how I could use my 
>>> termfilter string in a href="{% url search/...?... %}" format. Any help 
>>> or thoughts on the whole process would be much appreciated.
>>>
>>> Adam
>>>
>> -- 
>> -- To post, send email to [email protected] <javascript:>. To 
>> unsubscribe, send email to [email protected] <javascript:>. 
>> For more information, visit 
>> https://groups.google.com/d/forum/archesproject?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Arches Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" 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