First time here? Check out the FAQ!
1

Is custom favicon working?

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...

NoahY's avatar
303
NoahY
updated 2011-07-26 23:35:19 -0500, asked 2011-07-26 23:33:39 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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

mether's avatar
1.5k
mether
answered 2011-07-27 00:35:08 -0500
edit flag offensive 0 remove flag delete link

Comments

try my github fork... it should work.
NoahY's avatar NoahY (2011-07-27 08:47:44 -0500) 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 manage.py test askbot"
Evgeny's avatar Evgeny (2011-07-27 08:55:09 -0500) 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 -0500) edit
unit tests, https://docs.djangoproject.com/en/dev/topics/testing/ in askbot tests live under askbot/tests and to run them just call that command - python manage.py 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 -0500) 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 -0500) edit
add a comment see more comments