Ask Your Question
1

Is custom favicon working?

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

NoahY gravatar image

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

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
1

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

mether gravatar image

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

edit flag offensive delete link more

Comments

try my github fork... it should work.
NoahY gravatar imageNoahY ( 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 gravatar imageEvgeny ( 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 gravatar imageNoahY ( 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 gravatar imageEvgeny ( 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 gravatar imageNoahY ( 2011-07-28 00:25:00 -0500 )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

Stats

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

Seen: 140 times

Last updated: Jul 27 '11