Hi everyone,

I have been learning django and got my devel server up and running, I can access the admin section after going though the tutorial.

I have got my own application going, and running the examples but with my own templates I can not get my stylesheet or images loaded.

the following is my template.:

#################

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="" />
{% block extrastyle %}{% endblock %}
{% block extrahead %}{% endblock %}
</head>
{% load i18n %}

<body>

<!-- Top Nav Bar Section -->
    <div id="top">

<!-- Header -->
        <div id="user">Welcome, casibbald <br/>
                   [<a href="">Sign Out</a>]</div>
        <div align="left"><img src="" width="200" height="40" /></div>

        <div id="topnavigation">
             {% block topnavigation %}
             <ul id="topnavigation">
            <li><a href="">File</a>
               <ul>
                  <li><a href="">Item</a></li>
                  <li><a href="">Item</a></li>
                  <li><a href="">Item</a></li>
                  <li><a href="">Item</a></li>
               </ul>
            </li>
             </ul>
                 {% endblock %}
        </div>
    </div>



         <div id="leftmenu">
        {% block leftmenu %}
        <table cellpadding="0" cellspacing="0" border="0" width="180" class="modulehead">
              <tr>
             <th width="5" valign="top"><img src="" alt="" width="5" height="23" border="0" /></th>
             <th width="100%">Menu</th>
             <th width="7" valign="top"><img src="" alt="Shortcuts" width="7" height="23" border="0" /></th>
              </tr>
        </table>

 
        <table cellpadding="0" cellspacing="0" border="0" class="subMenu" width="180">
              <tr>
             <td width="16" style="background-image: url(../../../media/images/createBg.gif); background-repeat : repeat-y;"><img src="" width="16" height="16" /><img src="" width="16" height="16" /><img src="" width="16" height="16" /><img src="" width="16" height="16" /><img src="" width="16" height="16" /></td>
      <td nowrap="nowrap" id="navigation" class="subMenuTD"><ul>
               
                <li><a class="subMenuLink" href="">Create</a></li>
                <li><a href="">Edit</a></li>
                <li><a href="">New</a></li>
                <li><a href="">Add</a></li>
                <li><a href="">Delete</a></li></ul>
             </td>
             </tr>
        </table>
        {% endblock %}
        </div>
 
        <div id="breadcrumb">
        {% block breadcrumb %}
        <a href="">Home</a> &raquo; <a href="">Item</a>
        {% endblock %}
        </div>


        <div id="content">
        <table cellpadding="0" cellspacing="0" border="0" class="moduleheadContent">
             <tr>
                <th width="5"><img src=""  width="5" height="23" border="0"></th>
                <th width="100%" class="leftColumnModuleName">Module</th>
                <th width="5"><img src=""  width="7" height="23" border="0"></th>
             </tr>
        </table>
        <table border="0" cellpadding="0" cellspacing="0" class="moduleContent" >
             <tr>
                <td>&nbsp;</td>
            <td width="100%" valign="top">{% block content %}Content Goes here{% endblock %}</td>
             </tr>
        </table> 
        </div>

    <!-- END Content -->

    {% block footer %}<div id="footer">
            <div align="center" style="padding-top:18px"><span class="style2">&copy; 2006 OpenTelcom Inc. <a href="" class="style2">&nbsp;About Us</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="" class="style2">Privacy Policy</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="" class="style2">Terms of Use</a></span>&nbsp; <span class="style2"><a href="" class="style2">home</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="" class="style2">your account</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="" class="style2">services</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="" class="style2">products</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="" class="style2">support</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="" class="style2">contacts</a></span></div>
              </div>
    {% endblock %}
</div>
<!-- END Container -->

</body>
</html>
#################

The following is my settings file:
########################
# password / DB details omitted.

# Django settings for openbilling project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG


MANAGERS = ADMINS

# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'GMT'

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

# Absolute path to the directory that holds media.
MEDIA_ROOT = '/var/www/vhosts/opentelcom.org/openbilling/templates/media/'

# URL that handles the media served from MEDIA_ROOT.
MEDIA_URL = 'http://localhost'

# URL prefix for admin media -- CSS, _javascript_ and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = '_!8n+huqergqeh+'


# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
)

ROOT_URLCONF = 'openbilling.urls'

TEMPLATE_DIRS = (
    "/var/www/vhosts/opentelcom.org/openbilling/templates/application",
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'openbilling.polls',
)


#################
my directory structure is as follows:
/var/www/vhosts/opentelcom.org

and below it:
project
/openbilling
    media
           images
           js
           stylesheets
    templates
           admin
           application
                    polls






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to