Глификоны отображаются как пустые прямоугольники на моем сервере разработки.Django not rendering Glyphicons
настройки
from unipath import Path
BASE_DIR = Path(__file__).ancestor(2)
STATICFILES_DIRS = (BASE_DIR.child("static", "static_dirs"),)
STATIC_URL = '/static/'
шаблон
{% load staticfiles %}
<span class="glyphicon glyphicon-heart"></span>
<span class="glyphicon glyphicon-calendar"></span>
bootstrap.css/bootstrap.min.css
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
URLs
urlpatterns = patterns('',
url(regex = r'^$',
view = 'tesglyph.views.testglyph'),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Когда я добавляю к
base.html
<head>
(...)
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">(...)
</head>
Я получаю сердце, но не календарное!
Как исправить это?
Вы проверили генерируемый html для точности? одна причина работает, а другая, скорее всего, не является опечаткой или конфликтующим именем класса. – karthikr