How to change or modify a default theme

37 views
Skip to first unread message

Sergey Kolosovski

unread,
Feb 3, 2016, 8:43:59 AM2/3/16
to privacyidea
Hi Cornelius!
Could you please shed some light on the topic of how to change the default theme?
I know there's a doc http://privacyidea.readthedocs.org/en/latest/installation/system/inifile.html?highlight=bootstrap which says that this is pretty simple, just specify a path to your bootstrap theme in PI_CSS and that's it.

I tried to place a file called "bootstrap.css" taken from http://bootswatch.com/ to the newly created privacyidea/static/custom/css/ folder then specify
PI_CSS = '/usr/lib/python2.7/dist-packages/privacyidea/static/custom/css/bootstrap.css
then issued
service nginx restart
this didn't affect the look of PI but I checked source of a web-page:
<link href="/static/contrib/css/bootstrap.css" rel="stylesheet">
<link href="/static/contrib/css/bootstrap-theme.css" rel="stylesheet"/>
1) seems that PI ignored the PI_CSS setting because I specified one path but in html code is another
2) There are two .css files being used - bootstrap.css and bootstrap-theme.css. Which one should be taken and  maybe replaced from  http://bootswatch.com/? Which one suppose to be replaced with the one specified in PI_CSS?



Cornelius Kölbel

unread,
Feb 3, 2016, 9:22:16 AM2/3/16
to priva...@googlegroups.com
HI Sergey,

the 2nd stylesheet is the theme stylesheet and is set according to the
settings.
See the template:
https://github.com/privacyidea/privacyidea/blob/master/privacyidea/static/templates/header.html#L21

This is set in the controller:
https://github.com/privacyidea/privacyidea/blob/v2.9/privacyidea/webui/login.py#L46

But your issue arises from the fact, that you do not need to restart
nginx (as this only works as a proxy) but you probably need to restart
uwsgi.

Kind regards
Cornelius
> --
> Please read the blog post about getting help
> https://www.privacyidea.org/getting-help/.
>
> For professional services and consultancy regarding two factor
> authentication please visit
> https://netknights.it/en/leistungen/one-time-services/
>
> In an enterprise environment you should get a SERVICE LEVEL AGREEMENT
> which suites your needs for SECURITY, AVAILABILITY and LIABILITY:
> https://netknights.it/en/leistungen/service-level-agreements/
> ---
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> Visit this group at https://groups.google.com/group/privacyidea.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/2144da51-3109-459f-99ac-e997a349a628%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
Cornelius Kölbel
corneliu...@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


signature.asc

Sergey Kolosovski

unread,
Feb 3, 2016, 9:32:53 AM2/3/16
to privacyidea
Awesome!
Thank you for help! Indeed, I was needed to restart uwsgi service.

Cornelius Kölbel

unread,
Feb 3, 2016, 9:50:46 AM2/3/16
to priva...@googlegroups.com
Glad to be of help and that it works out! :-)
> --
> Please read the blog post about getting help
> https://www.privacyidea.org/getting-help/.
>
> For professional services and consultancy regarding two factor
> authentication please visit
> https://netknights.it/en/leistungen/one-time-services/
>
> In an enterprise environment you should get a SERVICE LEVEL AGREEMENT
> which suites your needs for SECURITY, AVAILABILITY and LIABILITY:
> https://netknights.it/en/leistungen/service-level-agreements/
> ---
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> Visit this group at https://groups.google.com/group/privacyidea.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/e5ed5cef-616e-4313-af55-191d6e1fcb23%40googlegroups.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages