Changeset a32cc8ed053a478f3602199b2df8ddcbf8e2de88


Ignore:
Timestamp:
16.04.2013 22:36:15 (6 years ago)
Author:
Stanislaw Klekot <dozzie@…>
Branches:
b66903eafbcb1d49112014abc82c8bf683413db0, prototype-new-outfit
Children:
b66903eafbcb1d49112014abc82c8bf683413db0
Parents:
d2294a777c693f6a5e8fc23e36658ecf6563821f
git-author:
Stanislaw Klekot <dozzie@…> (16.04.2013 22:36:15)
git-committer:
Stanislaw Klekot <dozzie@…> (16.04.2013 22:36:15)
Message:

Added proper URLs to static files.

This is a wild hack on Django templates, but I couldn't get anything better at
the moment.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dashwiki/urls.py

    r483808 ra32cc8  
    2222  (r'^logout/?$', 'logout'), 
    2323) 
     24 
     25urlpatterns += patterns('', 
     26  url( 
     27    r'^media/(?P<path>.*)$', 
     28    'django.views.static.serve', { 'document_root': 'media' }, 
     29    name = "static_media" 
     30  ), 
     31) 
  • media/style.css

    rd2294a ra32cc8  
    11html, body { 
    2         background: url('media/bg.png') repeat-x #eee; 
     2        background: url('bg.png') repeat-x #eee; 
    33        margin: 0; 
    44        padding: 0; 
  • templates/template.html

    rf8ec64 ra32cc8  
    33<head> 
    44        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    5         <link rel="stylesheet" type="text/css" href="media/style.css" /> 
     5        <link rel="stylesheet" type="text/css" href="{% url static_media '' %}style.css " /> 
    66        <title>{% block title %}&lt;default title&gt;{% endblock %} | DashWiki</title> 
    77</head> 
     
    1111        <div id="navbar"> 
    1212                <ul id="left-navbar"> 
    13                         <li><a href="{% url wiki.views.handle_wiki "WikiStart" %}"><img src="media/home.png" alt=""/>Home Page</a></li> 
     13                        <li><a href="{% url wiki.views.handle_wiki "WikiStart" %}"><img src="{% url static_media '' %}home.png" alt=""/>Home Page</a></li> 
    1414                        <li><a href="{% url wiki.views.list_pages %}">All pages</a></li> 
    1515                        <li><a href="{% url wiki.views.list_history %}">All changes</a></li> 
Note: See TracChangeset for help on using the changeset viewer.