Ask Your Question

Is custom favicon working?

asked 2011-07-26 23:33:39 -0600

NoahY's avatar

updated 2011-07-26 23:35:19 -0600

I think custom favicon is broken, or at least I can't figure out what I'm doing wrong... I've fixed it on my github, by changing base.html as follows:

    {% if settings.SITE_FAVICON %}
        <link rel="shortcut icon" href="{{ settings.SITE_FAVICON|media }}" />
    {% else %}
        <link rel="shortcut icon" href="{{ '/m/default/media/images/favicon.gif'|media }}" />
    {% endif %}

I also changed the default for settings.SITE_FAVICON to reflect what was in this file originally (/m/default/media/images/favicon.gif). I think /images/favicon.gif does not exist. If it works as I think it should, there is really no need for the if/else in the above code; simply:

<link rel="shortcut icon" href="{{ settings.SITE_FAVICON|media }}" />

should capture the default if set correctly. I can't test this, though, since there seems to be no way to reset the defaults... guess I could hack the database...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-07-27 00:35:08 -0600

mether's avatar

Yes. It isn't working for me either. @Evgeny, please fix. Thanks

edit flag offensive delete link more


try my github fork... it should work.
NoahY's avatar NoahY  ( 2011-07-27 08:47:44 -0600 )edit
I have just tried, unfortunately there are failing test cases, it all should be fixed before the merge. It is too easy to add bugs as the program becomes bigger, so I run tests on every commit - "python test askbot"
Evgeny's avatar Evgeny  ( 2011-07-27 08:55:09 -0600 )edit
ah, this is new to me... I don't quite understand test cases, but I can run that command before committing, sure.
NoahY's avatar NoahY  ( 2011-07-27 21:08:11 -0600 )edit
unit tests, in askbot tests live under askbot/tests and to run them just call that command - python test askbot. Usually if you do something and you get a new test failure - it means that something got broken.
Evgeny's avatar Evgeny  ( 2011-07-27 22:37:53 -0600 )edit
Oh, I'm sorry, again I changed something on the production server but forgot to go back and edit the dev code. setting.SITE_FAVICON should be settings.SITE_FAVICON Fixed now.
NoahY's avatar NoahY  ( 2011-07-28 00:25:00 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-07-26 23:33:39 -0600

Seen: 318 times

Last updated: Jul 27 '11