D
D
dr sbtn2016-04-24 02:28:40
Django
dr sbtn, 2016-04-24 02:28:40

How to insert favicon.ico into django project?

How to insert (and where?) favicon.ico address bar icon in Django project? can you upload any .ico image there?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2016-04-24
@dawasaturday

urls.py

urlpatterns = [
    ...
    url(r'^favicon\.ico$', RedirectView.as_view(url='/static/img/favicon.ico', permanent=True)),
    ...
]

S
sim3x, 2016-04-24
@sim3x

{% load static %}

<!doctype html>
<html>
<head>
  <meta charset="UTF-8">
  <title>{{ page_title }}</title>
  <link rel="stylesheet" href="{% static "css/main.css" %}">
  <link rel="shortcut icon" type="image/png" href="{% static "favicon.ico" %}">

....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question