Django数据背景网址不起作用

时间:2016-10-25 21:12:22

标签: javascript html css

我正在尝试播放相同的幻灯片,然后是Flickerplate(这里是Github链接https://github.com/chrishumboldt/Flickerplate) 这是我的HTML代码:

<!DOCTYPE html>

{% extends "home/base.html" %}
{% load static %}


<html>
  <head>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
      <!-- Title -->
  <title>Flickerplate Example</title>



  </head>

  <body>
  {% block content %}

  <!-- Basic example -->
  <div class="flicker-example">

    <ul>

      <li data-background="{% static 'img/flicker-1.jpg' %}">
        <div class="flick-title">Flickerplate Is Working</div>
        <div class="flick-sub-text">Heaven forbid this package you downloaded is broken. That wouldn't be embarrassing at all.</div>
      </li>

      <li data-background="{% static 'img/flicker-2.jpg' %}">
        <div class="flick-title">Editable via Javascript or CSS</div>
        <div class="flick-sub-text">Take a look at the extensive documentation to see how you can change the settings in multiple ways.</div>
      </li>

      <li data-background="{% static 'img/flicker-3.jpg' %}">
        <div class="flick-title">Touch Enabled Through the Hammer.js Library</div>
        <div class="flick-sub-text"><a href="http://hammerjs.github.io/">Hammer.js</a> is a great touch library that has been included as part of the Flickerplate package.</div>
      </li>

    </ul>

  </div>

  <!-- Documentation link -->
  <div class="documentation">

    <h3>Read The Documentation</h3>
    <p>There are a lot of options for editing Flickerplate so it's worthwhile getting up to speed. <a href="http://getwebplate.com/plugins/flickerplate">Click here</a> for more information.</p>

  </div>

  <script src="{% static 'js/min/flickerplate.min.js' %}"></script>
  <script>
  new flickerplate({
    selector: '.flicker-example'
  });
  </script>


    {% block extrahead %}
        {{block.super}}

      <script src="{% static 'js/accueil.js' %} "></script>
      <link rel="stylesheet" type="text/css" href="{% static 'css/accueil.css' %} "/>
        <!-- Include Hammer (optional) -->
  <script src="{% static 'js/hammer-v2.0.3.js' %}"></script>

  <!-- Include Flickerplate -->
  <script src="{% static 'js/flickerplate.js' %}"></script>
  <link href="{% static 'css/flickerplate.css'%}"  type="text/css" rel="stylesheet">

  <!-- Demo styles -->
  <link href="{% static 'css/demo.css'%}"  type="text/css" rel="stylesheet">

    {% endblock %}
  {% endblock %}

  </body>

  </html>

但图像没有出现。

以下是我的设置

STATIC_URL = '/static/'

STATICFILES_DIRS = (BASE_DIR + '/static',)
#definition du chemin vers media
MEDIA_ROOT = os.path.join(BASE_DIR, '/media/')
# substitution de User
AUTH_USER_MODEL ='compte.Utilisateurs'
# rajoute de https://github.com/dabapps/django-email-as-username pour email=username

TEMPLATE_DIRS = (

    os.path.join(BASE_DIR, 'templates'),


)

我的出现怎么样? 我已经多次检查过我的图像是否在正确的文件中

0 个答案:

没有答案