Explorar o código

Add favicon and remove unused images from static img folder

Edd Baldry %!s(int64=8) %!d(string=hai) anos
pai
achega
8f9783ab2b

BIN=BIN
bakerydemo/static/img/about-bg.jpg


BIN=BIN
bakerydemo/static/img/bread-favicon.ico


BIN=BIN
bakerydemo/static/img/contact-bg.jpg


BIN=BIN
bakerydemo/static/img/favicon.ico


BIN=BIN
bakerydemo/static/img/home-bg.jpg


BIN=BIN
bakerydemo/static/img/post-bg.jpg


BIN=BIN
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 += [