Subversion Repositories blog-sources

Compare Revisions

Ignore whitespace Rev 4 → Rev 5

/django-apache2-wsgi-2/idreammicro/apache-vhost/idreammicro
20,6 → 20,11
Allow from all
</Directory>
 
Alias /static/ /home/jlesech/www-django/idreammicro/static/
<Location "/static/">
Options -Indexes
</Location>
 
ErrorLog ${APACHE_LOG_DIR}/idreammicro_error.log
 
# Possible values include: debug, info, notice, warn, error, crit,
/django-apache2-wsgi-2/idreammicro/helloworld/views.py
1,4 → 1,4
from django.http import HttpResponse
from django.shortcuts import render
 
def index(request):
return HttpResponse("Hello world!")
return render(request, 'helloworld/index.html')
/django-apache2-wsgi-2/idreammicro/helloworld/static/helloworld/screen.css
0,0 → 1,4
p
{
color: red;
}
/django-apache2-wsgi-2/idreammicro/helloworld/templates/helloworld/index.html
0,0 → 1,9
{% extends "helloworld/base.html" %}
 
{% block title %}Hello world!{% endblock %}
 
{% block content %}
<p>
Hello world!
</p>
{% endblock %}
/django-apache2-wsgi-2/idreammicro/helloworld/templates/helloworld/base.html
0,0 → 1,14
<!DOCTYPE html>
<html lang="fr">
<head>
{% load staticfiles %}
<link rel="stylesheet" type="text/css" media="screen" href="{% static 'helloworld/screen.css' %}" />
<title>{% block title %}Hello world!{% endblock %}</title>
</head>
 
<body>
<div id="content">
{% block content %}{% endblock %}
</div>
</body>
</html>
/django-apache2-wsgi-2/idreammicro/idreammicro/settings.py
1,5 → 1,8
# Django settings for idreammicro project.
 
import os
PROJECT_ROOT = os.path.dirname(__file__) + '/..'
 
DEBUG = True
TEMPLATE_DEBUG = DEBUG
 
61,7 → 64,7
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = ''
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
 
# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"