*.pyc
*.sqlite3
*~
-
+all-static/
# however sometimes we have stuff not yet added, so in this case
ftags:
find . -type f | fgrep -v '/.git/' | xargs etags
+
+static:
+ ./manage.py collectstatic --noinput
</head>
<body>
{{ state }}
- <a href="/" alt="Home"><img class="logo" src="{{ STATIC_URL }}myslice-logo.png" alt="MySlice" /></a>
+ <a href="/" alt="Home"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>
<form action="/login/" method="post">
{% csrf_token %}
{% if next %}
#################### for insert_above
#IA_JS_FORMAT = "<script type='text/javascript' src='{URL}' />"
-IA_MEDIA_PREFIX = '/code/'
+# put stuff under static/
+# IA_MEDIA_PREFIX = '/code/'
--- /dev/null
+ul#mymenu {
+ position: fixed;
+ display: block;
+ padding:0;
+ margin:0;
+ bottom: 10px;
+ right: 10px;
+}
--- /dev/null
+// a dummy javascript file
+// I've seen this working, but of course it's painful ..
+//alert("loaded mymenu.js")
+{# This is required by insert_above #}
{% insert_handler %}
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title> Foo - an experimental slice page with foo= {{ foo }} </title>
-{% media_container media %}
+{# This is where insert_str will end up #}
+{% media_container prelude %}
<script>
{% container raw_js %}
</script>
<body>
{% block menu %} <div class='menu'> {{ menu }} </div> {% endblock %}
-{% block float %} <div class='float'> {{ float|default:"The float area" }} </div> {% endblock %}
+{% block float %} <div class='float'>
+ <img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" />
+ {{ float|default:"The float area" }} </div> {% endblock %}
{% block main %}
<div class='main'> <h1>Again, foo = {{ foo }} </h1> {{ main }} </div>
<hr>
-{% insert_str media "js/mymenu.js" %}
-{% insert_str media "css/mymenu.css" %}
+{% insert_str prelude "js/mymenu.js" %}
+{% insert_str prelude "css/mymenu.css" %}
+{# this shows how to add raw js code #}
{% insert raw_js %} "some script useful for mymenu" {% endinsert %}
-{% insert raw_css %}
-ul#mymenu { position: fixed; display: block; padding:0; margin:0;
- bottom: 10px; right: 10px; }
-{% endinsert %}
+{# use the raw_css container for css style #}
<ul id='mymenu'>
{% for d in menu_items %}
{% endfor %}
</ul>
-<!--
-<ul id='mymenu'>
- <li class="other"> other text </li>
- <li class="other"> another non-current text </li>
- <li class="current" title="the title for the current item">
- <span>"The label of the current menu" </span>
- </li>
-</ul>
--->