Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: django-favicon-plus-reloaded
3 Version: 1.2
4 Summary: Simple Django app which allows you to upload a image and it renders a wide variety for html link tags to display the favicon
5 Home-page: https://edugit.org/AlekSIS/libs/django-favicon-plus
6 Author: arteria GmbH
7 Author-email: [email protected]
8 Maintainer: AlekSIS Team
9 Maintainer-email: [email protected]
10 License: MIT
11 Classifier: Development Status :: 5 - Production/Stable
12 Classifier: Environment :: Web Environment
13 Classifier: Framework :: Django
14 Classifier: Intended Audience :: Developers
15 Classifier: License :: OSI Approved :: MIT License
16 Classifier: Operating System :: OS Independent
17 Classifier: Programming Language :: Python
18 Classifier: Programming Language :: Python :: 3
19 Classifier: Programming Language :: Python :: 3.8
20 Classifier: Programming Language :: Python :: 3.9
21 Classifier: Programming Language :: Python :: 3.10
22 Classifier: Programming Language :: Python :: 3.11
23 Classifier: Programming Language :: Python :: 3.12
24 Classifier: Topic :: Internet :: WWW/HTTP
25 Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
26 Description-Content-Type: text/markdown
27 License-File: LICENSE
28 License-File: AUTHORS.txt
29 Requires-Dist: django<6.0,>=4.2.0
30 Requires-Dist: pillow<11.0,>=10.0.0
31
32 # django-favicon-plus
33
34 Django favicon plus is a simple django app which allows you to upload a image and it renders a wide variety for html link tags to display the favicon. These different tags are used for bookmark links on mobile devices or they appear if you favorite a website in your browser.
35
36 This version is a fork of the [original version from arteria
37 GmbH](https://github.com/arteria/django-favicon-plus/) due to lack of
38 maintenance.
39
40 ## How to use:
41 Install django-favicon using PIP.
42 ```shell
43 pip install django-favicon-plus-reloaded
44 pip install git+https://edugit.org/AlekSIS/libs/django-favicon-plus.git
45 ```
46
47 Add app to `INSTALLED_APPS` List in your `settings.py` file, make sure `sites`-app is also installed, a URL is
48 specified in the admin backend and you specify your site in settings.py with `SITE_ID = <your-site-id-here>`.
49
50 ```python
51 INSTALLED_APPS = (
52 ...
53 'django.contrib.sites',
54 ...
55 'favicon',
56 ...
57 )
58 ```
59 The default `FAVICON_CONFIG` look like this, if you want something else you can define it in your settings.py.
60 The key of the dictionary is the value for the `rel` attribute of the link tag, while the list in the value are the
61 sizes for the `size` attribute and the image resizing.
62
63 ```python
64 FAVICON_CONFIG = {
65 'shortcut icon': [16 ,32 ,48 ,128, 192],
66 'touch-icon': [196],
67 'icon': [196],
68 'apple-touch-icon': [57, 72, 114, 144, 180],
69 'apple-touch-icon-precomposed': [57, 72, 76, 114, 120, 144, 152,180],
70 }
71 ```
72 Please make sure you have specified a `MEDIA_URL` in `settings.py` and your root `urlconf` looks like this:
73
74 ```python
75 urlpatterns = [
76 path('admin/', admin.site.urls),
77 ...,
78 ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
79 ```
80
81 You can also provide a `FAVICON_PATH` in your `settings.py` to specify the folder name of your favicon folder.
82 The default is `favicon`
83
84 Upload an image in the admin backend --> all the size will be created, its best to take a larger base favicon.
85
86 Use the templatetag in your base.html
87 ```html+django
88 {% load favtags %}
89
90 {% place_favicon %}
91 ```
92 this will create:
93 ```html
94 <link rel="apple-touch-icon-precomposed" size ="180x180" href="/media/favicon/fav-180.png"/>
95 <link rel="apple-touch-icon-precomposed" size ="152x152" href="/media/favicon/fav-152.png"/>
96 <link rel="apple-touch-icon-precomposed" size ="144x144" href="/media/favicon/fav-144.png"/>
97 <link rel="apple-touch-icon-precomposed" size ="120x120" href="/media/favicon/fav-120.png"/>
98 <link rel="apple-touch-icon-precomposed" size ="114x114" href="/media/favicon/fav-114.png"/>
99 <link rel="apple-touch-icon-precomposed" size ="76x76" href="/media/favicon/fav-76.png"/>
100 <link rel="apple-touch-icon-precomposed" size ="72x72" href="/media/favicon/fav-72.png"/>
101 <link rel="apple-touch-icon-precomposed" size ="57x57" href="/media/favicon/fav-57.png"/>
102 <link rel="apple-touch-icon" size ="180x180" href="/media/favicon/fav-180_5l5PyO1.png"/>
103 <link rel="apple-touch-icon" size ="144x144" href="/media/favicon/fav-144_5A8THfC.png"/>
104 <link rel="apple-touch-icon" size ="114x114" href="/media/favicon/fav-114_GqBGFXA.png"/>
105 <link rel="apple-touch-icon" size ="72x72" href="/media/favicon/fav-72_UoWu9ik.png"/>
106 <link rel="apple-touch-icon" size ="57x57" href="/media/favicon/fav-57_sfX3XoJ.png"/>
107 <link rel="touch-icon" size ="192x192" href="/media/favicon/fav-192.png"/>
108 <link rel="shortcut icon" size ="192x192" href="/media/favicon/fav-192_rD0bCKr.png"/>
109 <link rel="shortcut icon" size ="128x128" href="/media/favicon/fav-128.png"/>
110 <link rel="shortcut icon" size ="48x48" href="/media/favicon/fav-48.png"/>
111 <link rel="shortcut icon" size ="32x32" href="/media/favicon/fav-32.png"/>
112 <link rel="shortcut icon" size ="16x16" href="/media/favicon/fav-16.png"/>
113 <link rel="icon" size ="192x192" href="/media/favicon/fav-192_Gw5Uu1M.png"/>
114 <link rel="shortcut icon" size ="32x32" href="/media/favicon/fav-32.png"/>
115 ```
116 ## Management
117
118 You can upload multiple images, but only one is set as favicon and used.
119
120
121 ## Contribution
122
123 If you want to contribute something send an MR.
124
125
126 # Source
127
128 ### Based on
129
130 [Favicon Cheat Sheet on github](https://github.com/audreyr/favicon-cheat-sheet)
131
132 ### Favicon
133 16x16 .ico or better .png
134 ```html
135 <link rel="shortcut icon" href="/images/favicon.png" />
136 ```
137 ### apple-touch-icon(-precomposed)
138 57x57, 72x72, 114x114, and 144x144
139 highest resolution for ipad retina 144x144.png precomposed(=iOS won’t add any effects to the icon)
140 ```html
141 <link rel="apple-touch-icon" sizes="144x144" href="/images/apple-touch-icon-144x144.png">
142 <link rel="apple-touch-icon" sizes="114x114" href="/images/apple-touch-icon-114x114.png">
143 <link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon-72x72.png">
144 <link rel="apple-touch-icon" sizes="57x57" href="/images/apple-touch-icon-57x57.png">
145
146 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/images/apple-touch-icon-144x144.png">
147 <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/images/apple-touch-icon-114x114.png">
148 <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/images/apple-touch-icon-72x72.png">
149 <link rel="apple-touch-icon-precomposed" sizes="57x57" href="/images/apple-touch-icon-57x57.png">
150 ```
151 Android versions 1.5 and 1.6 will read the second tag (with "-precomposed"), and versions 2.1 and newer will read the first tag.
152
153 Google's specifications say that you should use 48x48 pixel PNGs, but you can use a large image (128x128), like Google does for its own apps.
154
155 https://mathiasbynens.be/notes/touch-icons