We are eventually trying to put our codes into omeroweb/searcher.
0.
if we want create "searcher" folder under "omeroweb", we need to modify the setting.py for INSTALLED APP to include omeroweb.searcher, right?
1.
And also in that new folder, we need to write
__init__.py,
urls.py
views.py
is there any restrictions with these files? If there is basic sample files for them, please send me.
2. About the inheritance of the default template pages (such as base.html) .
The basic template files are under /omeroweb/webclient/templates/...
Can you explain how to use those basic template files from an app under /omeroweb/searcher/ ?
I'm asking this question because it looks like the functions in template_loader can only load those template in the same folder.
For example, in the views.py under omeroweb/webclient (I'm playing with omero 4.2.1), the following line
template = "webclient/login.html"
refers to the login.html file under /omeroweb/webclient/templates/webclient/login.html
If I want to use the same login.html file from my own app under /omeroweb/searcher/views.py, could you tell me how to do?
3.
A technically general question about javascript.
We added a button on a default omero web page and when you click it, it executes a javascript function like the following,
- Code: Select all
function relevance_feedback_entireDB() {
if (!isCheckedById("image")) {//&& !isCheckedById("dataset") && !isCheckedById("plate")) {
alert ("Please select at least one image. Currently you cannot add other objects to basket.");
} else {
var productArray = $("input[type='checkbox']:checked");
var productListQuery = "";
var datasetID = "0";
var featureset = "SLF34";
var numretrieve = "10";
if (productArray.length > 0 ) {
productArray.each(function() {
if(this.checked) {
productListQuery += this.id + ",";
}
});
} else {
productListQuery += productArray.id + ",";
}
URL = productListQuery+'/'+datasetID+'/'+featureset+'/'+ numretrieve+'/';
window.location = 'http://omepslid.compbio.cs.cmu.edu/webclient/relevance/' + URL + '';
}
return false;
}
and it will call our app under /webclient/relevance/.
But, the line at the bottom
- Code: Select all
window.location = 'http://omepslid.compbio.cs.cmu.edu/webclient/relevance/' + URL + '';
should be definitely modified to make this function work on any server.
Could you tell me how to do this? (there could be a global variable that directs to the url of the local server)
Best,
BK