I'm new to Python and Django. I'm seeing this error message after I perform runserver, when trying to log in from my landing page,
$ python manage.py runserver Running in development mode. Running in development mode. Running in development mode. Running in development mode. Validating models... 0 errors found Django version 1.4b1, using settings 'platformsite.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [21/Feb/2012 02:33:26] "GET /accounts/home/ HTTP/1.1" 200 10698 WARNING 2012-02-21 02:33:27,204 base 41333 4353703936 Not Found: /favicon.ico [21/Feb/2012 02:33:30] "POST /accounts/home/ HTTP/1.1" 200 11098 WARNING 2012-02-21 02:33:30,581 base 41333 4362117120 Not Found: /favicon.ico [21/Feb/2012 02:33:35] "POST /accounts/home/ HTTP/1.1" 200 10975 WARNING 2012-02-21 02:33:36,333 base 41333 4370530304 Not Found: /favicon.ico [21/Feb/2012 02:33:57] "POST /accounts/home/ HTTP/1.1" 200 10975 WARNING 2012-02-21 02:33:57,670 base 41333 4349497344 Not Found: /favicon.ico
I'm on Python 2.7, Django 1.4, and OS X 10.7 What is this warning about and how do I get rid of it?
Most browsers look for the existence of an file called favicon. ico at the root path of your website domain, this controls the icon for the website you can see in your bookmarks folder or the address bar of your browser. If you don't have one, then it's valid that it would return a Not Found error.
Wrong file path You need to ensure that your favicon's file path is correct. If you have your icon in the images folder, then make sure that your file path has /images/favicon. ico depending on what you named your icon.
Django favicon Websites often override this generic favicon and use their logo or an image associated with their site. Favicons are typically added to the head element, but the Django favicon location is the static folder where it is then called via the urls.py file.
The favicon. ico file is a small graphic icon that is used by some browsers (including Microsoft Internet Explorer and Mozilla Firefox) to enhance the display of address bar information and "favorites" bookmark lists. When requesting a resource, these browsers also try to locate the site's custom favicon.
Most browsers look for the existence of an file called favicon.ico at the root path of your website domain, this controls the icon for the website you can see in your bookmarks folder or the address bar of your browser.
If you don't have one, then it's valid that it would return a Not Found error.
When you deploy to something like Apache, you will have to alias your favicon in a config file. However, while running Django in development mode, the following works
urls.py:
from django.views.generic import RedirectView from django.conf.urls import url url_patterns=[ ... url(r'^favicon\.ico$',RedirectView.as_view(url='/static/images/favicon.ico')), ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With