Skip to content

Commit

Permalink
fix redirect_to_theme_fav_icon
Browse files Browse the repository at this point in the history
  • Loading branch information
wtayyeb committed Nov 3, 2015
1 parent 50f88da commit 120357b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion theming/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
'''


VERSION = (0, 7, 3)
VERSION = (0, 7, 4)

__version__ = '.'.join((str(i) for i in VERSION))
1 change: 1 addition & 0 deletions theming/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .threadlocals import get_thread_variable
from .views import redirect_to_theme_fav_icon


try:
from django.template.engine import Engine
except ImportError:
Expand Down
5 changes: 3 additions & 2 deletions theming/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

from django.conf import settings
from django.http.response import HttpResponseRedirect
from django.templatetags.static import static

from .models import thememanager
from django.templatetags.static import static


def redirect_to_theme_fav_icon(request):
theme = thememanager.get_current_theme()
url = static(os.path.join(settings.THEMING_URL, theme.slug, '/images/favicon.ico'))
favicon = os.path.join(settings.THEMING_URL, theme.slug, 'images/favicon.ico').replace('\\', '/')
url = static(favicon)
return HttpResponseRedirect(url)

0 comments on commit 120357b

Please sign in to comment.