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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
NoahY's avatar
303
NoahY
updated 13 years ago, asked 13 years ago

Comments

see more comments

1 Answer

1

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
mether's avatar
1.5k
mether
answered 13 years ago
link

Comments

try my github fork... it should work.
NoahY's avatar NoahY (13 years ago)
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 (13 years ago)
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 (13 years ago)
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 (13 years ago)
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 (13 years ago)
see more comments