Open alefrost opened 11 years ago
How do I access inphosite.controller functions from inpho models? As for rewriting the json_struct() methods.
There should be no json_struct() in the inpho.models anymore - we'll just call inphosite.controller separately.
On Fri, Nov 22, 2013 at 2:03 PM, alefrost notifications@github.com wrote:
How do I access inphosite.controller functions from inpho models? As for rewriting the json_struct() methods.
— Reply to this email directly or view it on GitHubhttps://github.com/inpho/inphosite/issues/128#issuecomment-29099686 .
Here are some details on tackling different issues with converting the Mako Templates: For Titlecase() in helpers.py:
For breadcrumbs:
For login/authorization (admin and evaluations are the only panels that change)
For title and headtitle:
For any function calls to python functions in mako templates:
Little bit of confusion on the birth and death date information for thinkers. The mako templates use lists named 'birth_dates' & 'death_dates' but if I look at the json file for Kant it has 'birth', 'birth_string', 'death', and 'death_string', but not the lists referenced in the mako file. How do we want to go about displaying that information?
I have a question on the actb.html
file:
I'm assuming the line with: 'request.params.get(param, '')'
is referring to pulling in session variables. Is there an easy way to move this code to a server-side file, and if so, which one?
This code has almost completely been converted to mustache, but needs this last thing.
<div class="actb">
{{#label}}
<label for="{{id}}">{{label}}</label>
{{/label}}
<div class="form-search"
<% q = request.params.get(param,'') if param else value %>
<input class="input-medium search-query" type="text" id="{{id}}" name="{{id}}" ${'value="'+q+'"' if q else ''} data-provide="typeahead" autocomplete="off>
</div>
</div>
<script>inpho.actb.init('#{{id}}', '{{source}}');</script>
There are three functions in the page.py controller file that I don't what url to use, or if they are even used any more. Can someone let me know?
amt_taxonomy() json() graph()
These functions are used to:
amt_taxonomy - issue a redirect to http://inpho2.cogs.indiana.edu/amt_taxonomy/ json - render inpho.cogs.indiana.edu/json graph - render inpho.cogs.indiana.edu/graph
Both of the later 2 are like the owl file archives.
On Tue, Apr 22, 2014 at 5:06 PM, alefrost notifications@github.com wrote:
There are three functions in the page.py controller file that I don't what url to use, or if they are even used any more. Can someone let me know?
amt_taxonomy() json() graph()
— Reply to this email directly or view it on GitHubhttps://github.com/inpho/inphosite/issues/128#issuecomment-41095726 .
request.params.get
takes out the variables from the query string. Thus,
it is looking for a url like "http://inpho.cogs.indiana.edu/thinker?q=Kant"
and pulling out the 'q' param and the value "Kant".
Jaimie
On Tue, Apr 22, 2014 at 5:04 PM, alefrost notifications@github.com wrote:
I have a question on the actb.html file:
I'm assuming the line with: 'request.params.get(param, '')' is referring to pulling in session variables. Is there an easy way to move this code to a server-side file, and if so, which one?
This code has almost completely been converted to mustache, but needs this last thing.
{{#label}} {{/label}}alefrost commented 10 years agoFor the json and graph renders, both of them end up giving 404 errors on the live version of InPhO, is that supposed to happen?
alefrost commented 10 years agoJumbled thoughts from the past few days taxonomy path currently doesn't highlight when using the mustache templates.
Also, entity.py throws an error saying c.entity.wiki doesn't exist when I try to add it to the struct to pass to the renderer. Where does the wiki field come from?
http://inphodev.cogs.indiana.edu:8087/idea/1747 related terms won't 'show more'...
try passing ID in a json to partialDelegate in order to populate templates that need input like the breadcrumbs
alefrost commented 10 years agoSo after some testing, it seems to be the case that firing an AJAX post method with jquery requires the user to be logged in. If I try posting to any controller it always returns the html for the sign-in page. There was never a problem with this last time I created post methods for the unit test pages because you always have to be logged in already to use them. Is there a workaround we can implement that can allow calls to certain files? I don't know where that block comes from
alefrost commented 10 years agoFinal things to be done with templates:
- [x] Taxonomy path doesn't highlight when viewing a taxonomy entity
- [ ] With certain entities, some lists won't expand when the "show more..." link is clicked. Here is an example: http://inphodev.cogs.indiana.edu:8087/taxonomy/2318
- [ ] Implement authorization information
OK, so InPho will finally be growing some facial hair as we migrate from Mako to Mustache.js! Here is a preliminary list of items to accomplish along this migration to a more maintainable code base: