This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django Super Favicon

Django Super Favicon is a project that aiming to replace external solutions like realfavicongenerator.net: Create favicon for all kind of client platform.

Super Favicon does:

  • Creates icons in various size
  • Uploads them in static file storage (or other)
  • Creates HTML headers tags for use them

Why

It could sound useless, but hold a website identity in browsers’ favorites or iOS/Android/Windows home screen is a pretty good thing.

I often see that Django dev used to create a view for serve favicon.ico, I think this is summum of bad pratices: File must be served by a dedicated server. I designed this project to use Django Storage API and make generated files deployment agnostic.

There are other Django projects in the same topic:

That’s why super

Install & usage

pip install django-super-favicon

Add the following things in your settings.py:

INSTALLED_APPS = (
    ...
    'favicon',
    ...
)

Upload them to your storage (by default your filesystem):

./manage.py generate_favicon your_icon.png

And put this in your templates:

{% load favicon %}
...
<head>
...
{% get_favicons %}
</head>

It will produce something like:

<link rel="apple-touch-icon-precomposed" href="/static/favicon-152.png">

<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="/static/favicon-144.png">

<meta name="application-name" content="Name">
<meta name="msapplication-tooltip" content="Tooltip">
<meta name="msapplication-config" content="/static/ieconfig.xml">

<link rel="icon" href="/static/favicon-32.png" sizes="32x32">
<link rel="icon" href="/static/favicon-57.png" sizes="57x57">
<link rel="icon" href="/static/favicon-76.png" sizes="76x76">
<link rel="icon" href="/static/favicon-96.png" sizes="96x96">
<link rel="icon" href="/static/favicon-120.png" sizes="120x120">
<link rel="icon" href="/static/favicon-128.png" sizes="128x128">
<link rel="icon" href="/static/favicon-144.png" sizes="144x144">
<link rel="icon" href="/static/favicon-152.png" sizes="152x152">
<link rel="icon" href="/static/favicon-180.png" sizes="180x180">
<link rel="icon" href="/static/favicon-195.png" sizes="195x195">
<link rel="icon" href="/static/favicon-228.png" sizes="228x228">
<link rel="icon" href="/static/smalltile.png" sizes="128x128">
<link rel="icon" href="/static/mediumtile.png" sizes="270x270">
<link rel="icon" href="/static/widetile.png" sizes="558x270">
<link rel="icon" href="/static/largetile.png" sizes="558x558">
<link rel="shortcut icon" sizes="196x196" href="/static/favicon-196.png">

Settings

Super Favicon can be configured with the followings constants in settings.py:

FAVICON_STORAGE: Storage class used for store favicons, default: settings.STATICFILES_STORAGE

FAVICON_STORAGE_OPTIONS: Options used for instanciate the custom storage. default: {}

Management Commands

generate_favicon

Create favicons in different formats.

generate_favicon <source_file>

delete_favicon

Delete previously created favicon

delete_favicon

Contributing

All contribution are very welcomed, propositions, problems, bugs and enhancement are tracked with GitHub issues system and patch are submitted via pull requests.

We use Travis coupled with Coveralls as continious integration tools.

Release History

Release History

0.6.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-super-favicon-0.6.0.tar.gz (167.5 kB) Copy SHA256 Checksum SHA256 Source May 17, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting