浏览代码

Add favicon and remove unused images from static img folder

Edd Baldry 8 年之前
父节点
当前提交
8f9783ab2b

二进制
bakerydemo/static/img/about-bg.jpg


二进制
bakerydemo/static/img/bread-favicon.ico


二进制
bakerydemo/static/img/contact-bg.jpg


二进制
bakerydemo/static/img/favicon.ico


二进制
bakerydemo/static/img/home-bg.jpg


二进制
bakerydemo/static/img/post-bg.jpg


二进制
bakerydemo/static/img/post-sample-image.jpg


+ 8 - 0
bakerydemo/urls.py

@@ -26,10 +26,18 @@ if settings.DEBUG:
     from django.conf.urls.static import static
     from django.contrib.staticfiles.urls import staticfiles_urlpatterns
     from django.views.generic import TemplateView
+    from django.views.generic.base import RedirectView
 
     # Serve static and media files from development server
     urlpatterns += staticfiles_urlpatterns()
     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+    urlpatterns += [
+        url(
+            r'^favicon\.ico$', RedirectView.as_view(
+                url=settings.STATIC_URL + 'img/bread-favicon.ico'
+                )
+            )
+    ]
 
     # Add views for testing 404 and 500 templates
     urlpatterns += [