From: Thierry Parmentelat Date: Wed, 21 Nov 2012 18:38:09 +0000 (+0100) Subject: review how sattic files are kept X-Git-Tag: myslice-django-0.1-1~191 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=1f890ea0c653d62c2127921d43cf6ef233d7968b review how sattic files are kept --- diff --git a/.gitignore b/.gitignore index 90282c09..5c0ef9b1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ TAGS *.pyc *.sqlite3 *~ - +all-static/ diff --git a/Makefile b/Makefile index 99fb3210..fe0820fc 100644 --- a/Makefile +++ b/Makefile @@ -5,3 +5,6 @@ tags: # 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 diff --git a/auth/templates/auth.html b/auth/templates/auth.html index eda158b6..5376577d 100644 --- a/auth/templates/auth.html +++ b/auth/templates/auth.html @@ -12,7 +12,7 @@ body{ {{ state }} - +
{% csrf_token %} {% if next %} diff --git a/myslice/settings.py b/myslice/settings.py index 31432e5c..258c3e28 100644 --- a/myslice/settings.py +++ b/myslice/settings.py @@ -173,4 +173,5 @@ AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', ) #################### for insert_above #IA_JS_FORMAT = " @@ -13,7 +15,9 @@ {% block menu %} {% endblock %} -{% block float %}
{{ float|default:"The float area" }}
{% endblock %} +{% block float %}
+ + {{ float|default:"The float area" }}
{% endblock %} {% block main %}

Again, foo = {{ foo }}

{{ main }}

diff --git a/slice/templates/foo-menu.html b/slice/templates/foo-menu.html index 36d096c7..ed91b028 100644 --- a/slice/templates/foo-menu.html +++ b/slice/templates/foo-menu.html @@ -1,10 +1,8 @@ -{% 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 #} -