Skip to content
Snippets Groups Projects
Commit 138f8f10 authored by Yannik Ammann's avatar Yannik Ammann
Browse files

readme

parent bcd6d646
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
##How to use:##
Install django-favicon using PIP.
pip install -e git+ssh://git@bitbucket.org/arteria/django-favicon.git#egg=favicon
pip install git+https://github.com/yannik-ammann/django-favicon-plus.git
add app to `INSTALLED_APPS` List in your `settings.py` file, make sure `sites`-app is also installed and a url is specified in the admin backend
......@@ -19,8 +19,17 @@ add app to `INSTALLED_APPS` List in your `settings.py` file, make sure `sites`-a
...
)
The defaulf `FAVICON_CONFIG` look like this, if you want something else you can define it in your settings.py. The key of the dictionary is the value for the `rel` attribut of the link tag, while the list in the value are the sizes for the `size` attribute and the image resizing.
upload an image in the admin backend
FAVICON_CONFIG = {
'shortcut icon': [16 ,32 ,48 ,128, 192],
'touch-icon': [196],
'icon': [196],
'apple-touch-icon': [57, 72, 114, 144, 180],
'apple-touch-icon-precomposed': [57, 72, 76, 114, 120, 144, 152,180],
}
Upload an image in the admin backend --> all the size will be created, its best to take a larger base favicon eg. 256x256
use the templatetag in your base.html
......@@ -28,9 +37,28 @@ use the templatetag in your base.html
{% placeFavicon %}
this will create (if MEDIA_URL is set to /media/):
<link rel="shortcut icon" href="/media/favicon/favicon_1.png" />
this will create (if MEDIA_URL is set to /media/ and if you didnt specified `FAVICON_CONFIG` in you settings.py):
<link rel="apple-touch-icon-precomposed" size="180x180" href="/media/favicon/fav-180_OLm8xkp.png">
<link rel="apple-touch-icon-precomposed" size="152x152" href="/media/favicon/fav-152_9Jc67he.png">
<link rel="apple-touch-icon-precomposed" size="144x144" href="/media/favicon/fav-144_ZvxBOFK.png">
<link rel="apple-touch-icon-precomposed" size="120x120" href="/media/favicon/fav-120_RbBHHaY.png">
<link rel="apple-touch-icon-precomposed" size="114x114" href="/media/favicon/fav-114_61boHJ0.png">
<link rel="apple-touch-icon-precomposed" size="76x76" href="/media/favicon/fav-76_LMjcgGC.png">
<link rel="apple-touch-icon-precomposed" size="72x72" href="/media/favicon/fav-72_GSBPE5W.png">
<link rel="apple-touch-icon-precomposed" size="any" href="/media/favicon/fav-57_oPOGYKW.png">
<link rel="apple-touch-icon" size="180x180" href="/media/favicon/fav-180_h9ozLZs.png">
<link rel="apple-touch-icon" size="144x144" href="/media/favicon/fav-144_RWrDXut.png">
<link rel="apple-touch-icon" size="114x114" href="/media/favicon/fav-114_rw5MSSo.png">
<link rel="apple-touch-icon" size="72x72" href="/media/favicon/fav-72_ZLXeuvm.png">
<link rel="apple-touch-icon" size="any" href="/media/favicon/fav-57_I8FDkD3.png">
<link rel="touch-icon" size="any" href="/media/favicon/fav-196_dLcxCkI.png">
<link rel="shortcut icon" size="192x192" href="/media/favicon/fav-192_A1TsFrv.png">
<link rel="shortcut icon" size="128x128" href="/media/favicon/fav-128_h7IeovO.png">
<link rel="shortcut icon" size="48x48" href="/media/favicon/fav-48_PH92BdV.png">
<link rel="shortcut icon" size="32x32" href="/media/favicon/fav-32_HbSGwrB.png">
<link rel="shortcut icon" size="any" href="/media/favicon/fav-16_oQulYqJ.png">
<link rel="icon" size="any" href="/media/favicon/fav-196_3XOHSqi.png">
##favicon##
16x16 .ico or better .png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment