euscanwww: django 1.4 port

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
Corentin Chary 2012-04-04 14:33:40 +02:00
parent d5a9b31b3c
commit 9f1cdae45e
54 changed files with 117 additions and 242 deletions

4
euscanwww/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
var/cache/*/
var/charts/*.png
var/rrd/*.rrd
var/db/euscan.db

50
euscanwww/api/emitters.py Normal file
View File

@ -0,0 +1,50 @@
from piston.emitters import Emitter, XMLEmitter
class EuscanXMLEmitter(XMLEmitter):
_parent = []
_known_parents = {
'vlog' : 'version',
'herds' : 'herd',
'maintainers' : 'maintainer',
'packaged' : 'version',
'upstream' : 'version',
'packages' : 'package',
'categories' : 'category'
}
def _push_parent(self, parent):
self._parent.append(parent)
def _pop_parent(self):
if self._parent:
return self._parent.pop()
else:
return None
def _current_parent(self):
if self._parent:
return self._parent[-1]
else:
return None
def _name_from_parent(self):
return self._known_parents.get(self._current_parent(), 'resource')
def _to_xml(self, xml, data):
def recurse(name, xml, item):
attrs = {}
xml.startElement(name, attrs)
self._push_parent(name)
self._to_xml(xml, item)
self._pop_parent()
xml.endElement(name)
if isinstance(data, (list, tuple)):
for item in data:
name = self._name_from_parent()
recurse(name, xml, item)
elif isinstance(data, dict):
for key, value in data.iteritems():
recurse(key, xml, value)
else:
super(EuscanXMLEmitter, self)._to_xml(xml, data)

View File

@ -12,8 +12,8 @@ import rrdtool
import pylab import pylab
import matplotlib import matplotlib
CHARTS_ROOT = os.path.join(settings.MEDIA_ROOT, "charts") CHARTS_ROOT = os.path.join(settings.EUSCAN_ROOT, 'var', 'charts')
CHARTS_URL = os.path.join(settings.MEDIA_URL, "charts") CHARTS_URL = os.path.join(settings.EUSCAN_ROOT, 'var', 'charts')
CHARTS_TTL = (24 * 60 * 60) CHARTS_TTL = (24 * 60 * 60)
pylab.rcParams['font.size'] = 10.0 pylab.rcParams['font.size'] = 10.0

View File

@ -48,18 +48,18 @@ class Command(BaseCommand):
def scan(self, query=None, obj=None): def scan(self, query=None, obj=None):
matches = Query(query).find( matches = Query(query).find(
include_masked=True, include_masked=True,
in_installed=False, in_installed=False,
) )
if not matches: if not matches:
sys.stderr.write(self.style.ERROR("Unknown package '%s'\n" % query)) sys.stderr.write(self.style.ERROR("Unknown package '%s'\n" % query))
return return
matches = sorted(matches) matches = sorted(matches)
pkg = matches.pop() pkg = matches.pop()
if '9999' in pkg.version and len(matches): if '9999' in pkg.version and len(matches):
pkg = matches.pop() pkg = matches.pop()
if not obj: if not obj:
obj, created = Package.objects.get_or_create(category=pkg.category, name=pkg.name) obj, created = Package.objects.get_or_create(category=pkg.category, name=pkg.name)

View File

@ -1,5 +1,4 @@
from django.db import models from django.db import models
from datetime import datetime
class Herd(models.Model): class Herd(models.Model):
herd = models.CharField(max_length=128, unique=True) herd = models.CharField(max_length=128, unique=True)
@ -74,7 +73,7 @@ class VersionLog(models.Model):
) )
package = models.ForeignKey(Package) package = models.ForeignKey(Package)
datetime = models.DateTimeField(default=datetime.now()) datetime = models.DateTimeField(auto_now_add=True)
slot = models.CharField(max_length=128) slot = models.CharField(max_length=128)
revision = models.CharField(max_length=128) revision = models.CharField(max_length=128)
version = models.CharField(max_length=128) version = models.CharField(max_length=128)

View File

@ -1,5 +1,7 @@
from django import template from django import template
from django.utils.timesince import timesince from django.utils.timesince import timesince
from django.conf import settings
from django.utils.timezone import make_aware, get_default_timezone
from datetime import datetime from datetime import datetime
register = template.Library() register = template.Library()
@ -11,6 +13,8 @@ def timedelta(value, arg=None):
cmp = arg cmp = arg
else: else:
cmp = datetime.now() cmp = datetime.now()
if settings.USE_TZ:
cmp = make_aware(cmp, get_default_timezone())
if value > cmp: if value > cmp:
return "in %s" % timesince(cmp,value) return "in %s" % timesince(cmp,value)
else: else:

View File

@ -3,8 +3,8 @@ from django.http import HttpResponse, Http404
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.db.models import Sum, Max from django.db.models import Sum, Max
from euscan.models import Version, Package, Herd, Maintainer, EuscanResult, VersionLog from models import Version, Package, Herd, Maintainer, EuscanResult, VersionLog
from euscan.forms import WorldForm, PackagesForm from forms import WorldForm, PackagesForm
import charts import charts

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 612 B

View File

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 800 B

After

Width:  |  Height:  |  Size: 800 B

View File

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 635 B

View File

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 852 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 210 B

View File

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 916 B

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 558 B

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 263 B

View File

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 260 B

View File

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 251 B

View File

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 751 B

View File

@ -1,11 +1,9 @@
#!/usr/bin/env python #!/usr/bin/env python
from django.core.management import execute_manager import os, sys
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)
if __name__ == "__main__": if __name__ == "__main__":
execute_manager(settings) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "euscanwww.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

View File

@ -1,156 +0,0 @@
# Django settings for euscanwww project.
import os.path
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('admin', 'admin@example.com'),
)
MANAGERS = ADMINS
"""
# MySQL Example:
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'euscan',
'USER': 'euscan',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '',
'OPTIONS': {
'init_command': 'SET storage_engine=INNODB',
}
},
# PostGreSQL Example:
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'euscan',
'USER': 'euscan',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
},
"""
EUSCAN_ROOT = os.path.dirname(os.path.abspath(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(EUSCAN_ROOT, 'euscan.db')
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': os.path.join(EUSCAN_ROOT, 'euscan.cache'),
}
}
RRD_ROOT = os.path.join(EUSCAN_ROOT, 'rrd')
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'Europe/Paris'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = os.path.join(EUSCAN_ROOT, 'media/')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/media/'
# 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 = '/admin-media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '00000000000000000000000000000000000000000000000000'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
# 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
CACHE_MIDDLEWARE_SECONDS=3600
CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
ROOT_URLCONF = 'euscanwww.urls'
FORCE_SCRIPT_NAME=""
TEMPLATE_DIRS = (
os.path.join(EUSCAN_ROOT, 'templates'),
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'south',
'euscan',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
try:
from local_settings import *
except ImportError, ex:
import sys
sys.stderr.write(\
("settings.py: error importing local settings file:\n" + \
"\t%s\n" + \
"Do you have a local_settings.py module?\n") % str(ex))
raise

View File

@ -7,7 +7,7 @@
<link rel="alternate" type="application/atom+xml" title="Global log" href="{% url global_feed %}" /> <link rel="alternate" type="application/atom+xml" title="Global log" href="{% url global_feed %}" />
{% endblock %} {% endblock %}
{% block css %} {% block css %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/style.css" media="screen" title="Normal" /> <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/style.css" media="screen" title="Normal" />
{% endblock %} {% endblock %}
{% block javascript %} {% block javascript %}
{% endblock %} {% endblock %}
@ -15,7 +15,7 @@
<body> <body>
<div id="header"> <div id="header">
<a href="http://www.gentoo.org"> <a href="http://www.gentoo.org">
<img id="logo" src="{{ MEDIA_URL }}img/gentoo_org.png" /> <img id="logo" src="{{ STATIC_URL }}img/gentoo_org.png" />
</a> </a>
{% block header %}<h1>Ebuild Upstream Scanner (euscan)</h1>{% endblock %} {% block header %}<h1>Ebuild Upstream Scanner (euscan)</h1>{% endblock %}
</div> </div>
@ -42,7 +42,7 @@
<li>---</li> <li>---</li>
{% block menu_feed %} {% block menu_feed %}
<li> <li>
<img src="{{ MEDIA_URL }}img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}img/feed.png" alt="feed" />
<a title="Global Feed" href="{% url global_feed %}">Global Feed</a> <a title="Global Feed" href="{% url global_feed %}">Global Feed</a>
</li> </li>
{% endblock %} {% endblock %}

View File

@ -2,13 +2,13 @@
{% block css %} {% block css %}
{{ block.super }} {{ block.super }}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/table.css" media="screen" title="Normal" /> <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/table.css" media="screen" title="Normal" />
{% endblock %} {% endblock %}
{% block javascript %} {% block javascript %}
{{ block.super }} {{ block.super }}
<script type="text/javascript" language="javascript" src="{{MEDIA_URL}}js/jquery.js"></script> <script type="text/javascript" language="javascript" src="{{STATIC_URL}}js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="{{MEDIA_URL}}js/jquery.dataTables.js"></script> <script type="text/javascript" language="javascript" src="{{STATIC_URL}}js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(document).ready(function() { $(document).ready(function() {
@ -26,10 +26,10 @@
{{ block.super }} {{ block.super }}
<div class="menu"> <div class="menu">
<ul> <ul>
<li><img src="{{ MEDIA_URL }}img/gentoo-icon.png" /> Gentoo</li> <li><img src="{{ STATIC_URL }}img/gentoo-icon.png" /> Gentoo</li>
<li><img src="{{ MEDIA_URL }}img/overlay-icon.png" /> Overlays</li> <li><img src="{{ STATIC_URL }}img/overlay-icon.png" /> Overlays</li>
<li><img src="{{ MEDIA_URL }}img/upstream-icon.png" /> Upstream</li> <li><img src="{{ STATIC_URL }}img/upstream-icon.png" /> Upstream</li>
<li><img src="{{ MEDIA_URL }}img/freshness-icon.png" /> Freshness</li> <li><img src="{{ STATIC_URL }}img/freshness-icon.png" /> Freshness</li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -6,13 +6,13 @@
<table id="table" class="display"> <table id="table" class="display">
<thead> <thead>
<th>Package</th> <th>Package</th>
<th><img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="Last version in Gentoo" /></th> <th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Last version in Gentoo" /></th>
<th><img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="Last version in Overlays" /></th> <th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Last version in Overlays" /></th>
<th><img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Last version Upstream" /></th> <th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Last version Upstream" /></th>
<th><img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th> <th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th> <th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th> <th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ MEDIA_URL }}img/freshness-icon.png" title="Freshness" /></th> <th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
</thead> </thead>
<tbody> <tbody>
{% for package in packages %} {% for package in packages %}

View File

@ -26,16 +26,16 @@
<p> <p>
Powered by: Powered by:
<a href="http://kernel.org" titke="Linux Kernel"> <a href="http://kernel.org" titke="Linux Kernel">
<img src="{{MEDIA_URL}}img/linux.png" alt="Linux Kernel" /> <img src="{{STATIC_URL}}img/linux.png" alt="Linux Kernel" />
</a> </a>
<a href="http://gentoo.org" title="Gentoo"> <a href="http://gentoo.org" title="Gentoo">
<img src="{{MEDIA_URL}}img/gentoo.png" alt="Gentoo Linux" /> <img src="{{STATIC_URL}}img/gentoo.png" alt="Gentoo Linux" />
</a> </a>
<a href="http://www.djangoproject.com/" title="Django"> <a href="http://www.djangoproject.com/" title="Django">
<img src="{{MEDIA_URL}}img/django.png" alt="Django" /> <img src="{{STATIC_URL}}img/django.png" alt="Django" />
</a> </a>
<a href="http://python.org" title="Python"> <a href="http://python.org" title="Python">
<img src="{{MEDIA_URL}}img/python.png" alt="Python" /> <img src="{{STATIC_URL}}img/python.png" alt="Python" />
</a> </a>
</p> </p>
{% endblock %} {% endblock %}

View File

@ -12,10 +12,10 @@
<table id="table" class="display"> <table id="table" class="display">
<thead> <thead>
<th>Category</th> <th>Category</th>
<th><img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th> <th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th> <th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th> <th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ MEDIA_URL }}img/freshness-icon.png" title="Freshness" /></th> <th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
{% if request.GET.extras %} {% if request.GET.extras %}
<th>Graphs</th> <th>Graphs</th>
{% endif %} {% endif %}

View File

@ -9,7 +9,7 @@
{% block menu_feed %} {% block menu_feed %}
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ MEDIA_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ category }} Feed" href="{% url category_feed category %}">{{ category }}</a> <a title="{{ category }} Feed" href="{% url category_feed category %}">{{ category }}</a>
</li> </li>
{% endblock %} {% endblock %}

View File

@ -9,7 +9,7 @@
{% block menu_feed %} {% block menu_feed %}
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ MEDIA_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ herd.herd }} Feed" href="{% url herd_feed herd.herd %}">{{ herd.herd }}</a> <a title="{{ herd.herd }} Feed" href="{% url herd_feed herd.herd %}">{{ herd.herd }}</a>
</li> </li>
{% endblock %} {% endblock %}

View File

@ -11,10 +11,10 @@
<table id="table" class="display"> <table id="table" class="display">
<thead> <thead>
<th>Herd</th> <th>Herd</th>
<th><img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th> <th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th> <th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th> <th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ MEDIA_URL }}img/freshness-icon.png" title="Freshness" /></th> <th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
{% if request.GET.extras %} {% if request.GET.extras %}
<th>Graphs</th> <th>Graphs</th>
{% endif %} {% endif %}

View File

@ -9,7 +9,7 @@
{% block menu_feed %} {% block menu_feed %}
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ MEDIA_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ maintainer.name }} Feed" href="{% url maintainer_feed maintainer.id %}">{{ maintainer.name }}</a> <a title="{{ maintainer.name }} Feed" href="{% url maintainer_feed maintainer.id %}">{{ maintainer.name }}</a>
</li> </li>
{% endblock %} {% endblock %}

View File

@ -11,10 +11,10 @@
<table id="table" class="display"> <table id="table" class="display">
<thead> <thead>
<th>Maintainer</th> <th>Maintainer</th>
<th><img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th> <th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th> <th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th> <th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ MEDIA_URL }}img/freshness-icon.png" title="Freshness" /></th> <th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
{% if request.GET.extras %} {% if request.GET.extras %}
<th>Graphs</th> <th>Graphs</th>
{% endif %} {% endif %}

View File

@ -10,7 +10,7 @@
{% block menu_feed %} {% block menu_feed %}
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ MEDIA_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ package }} Feed" href="{% url package_feed package.category package.name %}">{{ package }}</a> <a title="{{ package }} Feed" href="{% url package_feed package.category package.name %}">{{ package }}</a>
</li> </li>
{% endblock %} {% endblock %}
@ -69,9 +69,9 @@
{% for version in packaged %} {% for version in packaged %}
<li id="{{ version.version }}-{{version.revision }}:{{ version.slot }}-[{{ version.overlay }}]"> <li id="{{ version.version }}-{{version.revision }}:{{ version.slot }}-[{{ version.overlay }}]">
{% if version.overlay == "gentoo" %} {% if version.overlay == "gentoo" %}
<img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" /> <img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" />
{% else %} {% else %}
<img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="In Overlays" /> <img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="In Overlays" />
{% endif %} {% endif %}
{{ version.version }}-{{ version.revision }} :{{ version.slot }} [{{ version.overlay }}] {{ version.version }}-{{ version.revision }} :{{ version.slot }} [{{ version.overlay }}]
</li> </li>
@ -85,7 +85,7 @@
<ul> <ul>
{% for version in upstream %} {% for version in upstream %}
<li> <li>
<img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" /> <img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" />
{{ version.version }} - {{ version.urls }} {{ version.version }} - {{ version.urls }}
</li> </li>
{% endfor %} {% endfor %}
@ -102,11 +102,11 @@
<li class="removed"> <li class="removed">
{% endif %} {% endif %}
{% if version.overlay == "gentoo" %} {% if version.overlay == "gentoo" %}
<img src="{{ MEDIA_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" /> <img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" />
{% else %}{% if version.overlay %} {% else %}{% if version.overlay %}
<img src="{{ MEDIA_URL }}img/overlay-icon.png" alt="overlays" title="In Overlays" /> <img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="In Overlays" />
{% else %} {% else %}
<img src="{{ MEDIA_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" /> <img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" />
{% endif %}{% endif %} {% endif %}{% endif %}
{{ version }} - {{ version.datetime }} {{ version }} - {{ version.datetime }}
</li> </li>

View File

@ -1,24 +0,0 @@
from django.conf import settings
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^api/', include('api.urls')),
(r'^', include('euscan.urls')),
)
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
)

0
euscanwww/var/db/.keep Normal file
View File

0
euscanwww/var/rrd/.keep Normal file
View File

View File