[ome-users] custom omero.web template

MEYENHOFER Felix felix.meyenhofer at unifr.ch
Mon Aug 14 18:18:44 BST 2017


Hey Will

thanks for the info.

I use the custom login setting. But this is not picked up either in the context for the index page.

What confuses me a bit, is that in the example of the customization 
https://docs.openmicroscopy.org/omero/5.3.3/sysadmins/customization.html#index-page
... the login form seems to work.

in the current state of OMERO.web would this require modification of the index view, would it not?

Felix

> On 31 Jul 2017, at 14:49, William Moore (Staff) <W.Moore at dundee.ac.uk> wrote:
> 
> Hi Felix,
> 
>  One option to make smaller customisations of the login page is to add a custom logo: See https://docs.openmicroscopy.org/omero/5.3.3/sysadmins/config.html#omero-web-login-logo.
> 
> Otherwise, if you want a more-customised login page, you’ll have to add the form elements to your template instead of using {{ block super }}.
> 
>  Let us know if you have any more details on what you’d like to achieve,
> 
>  Regards,
> 
>   Will.
> 
>  
> 
>> On 21 Jul 2017, at 21:15, William Moore (Staff) <wmoore at dundee.ac.uk> wrote:
>> 
>> Hi Felix,
>> 
>>  If you want to display the login form, then this needs to be included in the context that
>> is used to render the page.
>> 
>> See the context that is prepared in ‘handle_not_logged_in()’ at
>> https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroWeb/omeroweb/webclient/views.py#L220
>> which includes several variables required by the login page, including the LoginForm required within the {% block login %}.
>> 
>> As you can see here, the Custom page doesn’t include any of these in it’s context.
>> https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroWeb/omeroweb/webclient/views.py#L149
>> 
>> I’m away on holiday this week, but can give your requirements a bit more thought when I’m back next week…
>> 
>>  Regards,
>> 
>>   Will.
>> 
>> 
>> 
>> 
>>> On 21 Jul 2017, at 11:53, MEYENHOFER Felix <felix.meyenhofer at unifr.ch> wrote:
>>> 
>>> Hi
>>> 
>>> I was playing around with the customization of the web templates. There is the possibility to set a custom index page:;
>>> https://www-legacy.openmicroscopy.org/site/support/omero5.3/sysadmins/customization.html#index-page
>>> 
>>> So I went and used the webclient/index.html template, which works fine. But then I tried to add the login form on the same page by inserting 
>>> {{ block.super }}
>>> into the (% block login %} 
>>> 
>>> the result is not quite what I expected (see screenshot)
>>> https://drive.switch.ch/index.php/s/lTL00RDleui3XFC
>>> When inspecting the page source code, there are comments <!--Form Error-->, where the fields from the login form should appear. 
>>> 
>>> I could not find anything in the omero.web logs nor in the nginx logs. 
>>> 
>>> Is there another easy explanation for this?
>>> 
>>> Best, 
>>> 
>>> Felix
>>> _______________________________________________
>>> ome-users mailing list
>>> ome-users at lists.openmicroscopy.org.uk
>>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>> 
> 
> 
> The University of Dundee is a registered Scottish Charity, No: SC015096
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list