euscanwww: django 1.4 port
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
1 parent
d5a9b31b3c
commit
9f1cdae45e
54 files changed
+117
-242
No files matched your search
@@ -0,0 +1,4 @@
|
||||
var/cache/*/
|
||||
var/charts/*.png
|
||||
var/rrd/*.rrd
|
||||
var/db/euscan.db
|
||||
@@ -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)
|
||||
@@ -12,8 +12,8 @@ import rrdtool
|
||||
import pylab
|
||||
import matplotlib
|
||||
|
||||
CHARTS_ROOT = os.path.join(settings.MEDIA_ROOT, "charts")
|
||||
CHARTS_URL = os.path.join(settings.MEDIA_URL, "charts")
|
||||
CHARTS_ROOT = os.path.join(settings.EUSCAN_ROOT, 'var', 'charts')
|
||||
CHARTS_URL = os.path.join(settings.EUSCAN_ROOT, 'var', 'charts')
|
||||
CHARTS_TTL = (24 * 60 * 60)
|
||||
|
||||
pylab.rcParams['font.size'] = 10.0
|
||||
|
||||
@@ -48,18 +48,18 @@ class Command(BaseCommand):
|
||||
|
||||
def scan(self, query=None, obj=None):
|
||||
matches = Query(query).find(
|
||||
include_masked=True,
|
||||
in_installed=False,
|
||||
include_masked=True,
|
||||
in_installed=False,
|
||||
)
|
||||
|
||||
if not matches:
|
||||
sys.stderr.write(self.style.ERROR("Unknown package '%s'\n" % query))
|
||||
return
|
||||
sys.stderr.write(self.style.ERROR("Unknown package '%s'\n" % query))
|
||||
return
|
||||
|
||||
matches = sorted(matches)
|
||||
pkg = matches.pop()
|
||||
if '9999' in pkg.version and len(matches):
|
||||
pkg = matches.pop()
|
||||
pkg = matches.pop()
|
||||
|
||||
if not obj:
|
||||
obj, created = Package.objects.get_or_create(category=pkg.category, name=pkg.name)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from django.db import models
|
||||
from datetime import datetime
|
||||
|
||||
class Herd(models.Model):
|
||||
herd = models.CharField(max_length=128, unique=True)
|
||||
@@ -74,7 +73,7 @@ class VersionLog(models.Model):
|
||||
)
|
||||
|
||||
package = models.ForeignKey(Package)
|
||||
datetime = models.DateTimeField(default=datetime.now())
|
||||
datetime = models.DateTimeField(auto_now_add=True)
|
||||
slot = models.CharField(max_length=128)
|
||||
revision = models.CharField(max_length=128)
|
||||
version = models.CharField(max_length=128)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from django import template
|
||||
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
|
||||
|
||||
register = template.Library()
|
||||
@@ -11,6 +13,8 @@ def timedelta(value, arg=None):
|
||||
cmp = arg
|
||||
else:
|
||||
cmp = datetime.now()
|
||||
if settings.USE_TZ:
|
||||
cmp = make_aware(cmp, get_default_timezone())
|
||||
if value > cmp:
|
||||
return "in %s" % timesince(cmp,value)
|
||||
else:
|
||||
|
||||
@@ -3,8 +3,8 @@ from django.http import HttpResponse, Http404
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.db.models import Sum, Max
|
||||
|
||||
from euscan.models import Version, Package, Herd, Maintainer, EuscanResult, VersionLog
|
||||
from euscan.forms import WorldForm, PackagesForm
|
||||
from models import Version, Package, Herd, Maintainer, EuscanResult, VersionLog
|
||||
from forms import WorldForm, PackagesForm
|
||||
|
||||
import charts
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+6
-8
@@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
from django.core.management import execute_manager
|
||||
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)
|
||||
import os, sys
|
||||
|
||||
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)
|
||||
@@ -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
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="alternate" type="application/atom+xml" title="Global log" href="{% url global_feed %}" />
|
||||
{% endblock %}
|
||||
{% 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 %}
|
||||
{% block javascript %}
|
||||
{% endblock %}
|
||||
@@ -15,7 +15,7 @@
|
||||
<body>
|
||||
<div id="header">
|
||||
<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>
|
||||
{% block header %}<h1>Ebuild Upstream Scanner (euscan)</h1>{% endblock %}
|
||||
</div>
|
||||
@@ -42,7 +42,7 @@
|
||||
<li>---</li>
|
||||
{% block menu_feed %}
|
||||
<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>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
{% block css %}
|
||||
{{ 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 %}
|
||||
|
||||
{% block javascript %}
|
||||
{{ block.super }}
|
||||
<script type="text/javascript" language="javascript" src="{{MEDIA_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.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="{{STATIC_URL}}js/jquery.dataTables.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
@@ -26,10 +26,10 @@
|
||||
{{ block.super }}
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li><img src="{{ MEDIA_URL }}img/gentoo-icon.png" /> Gentoo</li>
|
||||
<li><img src="{{ MEDIA_URL }}img/overlay-icon.png" /> Overlays</li>
|
||||
<li><img src="{{ MEDIA_URL }}img/upstream-icon.png" /> Upstream</li>
|
||||
<li><img src="{{ MEDIA_URL }}img/freshness-icon.png" /> Freshness</li>
|
||||
<li><img src="{{ STATIC_URL }}img/gentoo-icon.png" /> Gentoo</li>
|
||||
<li><img src="{{ STATIC_URL }}img/overlay-icon.png" /> Overlays</li>
|
||||
<li><img src="{{ STATIC_URL }}img/upstream-icon.png" /> Upstream</li>
|
||||
<li><img src="{{ STATIC_URL }}img/freshness-icon.png" /> Freshness</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -6,13 +6,13 @@
|
||||
<table id="table" class="display">
|
||||
<thead>
|
||||
<th>Package</th>
|
||||
<th><img src="{{ MEDIA_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="{{ MEDIA_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="{{ MEDIA_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="{{ MEDIA_URL }}img/freshness-icon.png" title="Freshness" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Last version in Gentoo" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Last version in Overlays" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Last version Upstream" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for package in packages %}
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
<p>
|
||||
Powered by:
|
||||
<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 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 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 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>
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -12,10 +12,10 @@
|
||||
<table id="table" class="display">
|
||||
<thead>
|
||||
<th>Category</th>
|
||||
<th><img src="{{ MEDIA_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="{{ MEDIA_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/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
|
||||
{% if request.GET.extras %}
|
||||
<th>Graphs</th>
|
||||
{% endif %}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% block menu_feed %}
|
||||
{{ block.super }}
|
||||
<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>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% block menu_feed %}
|
||||
{{ block.super }}
|
||||
<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>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<table id="table" class="display">
|
||||
<thead>
|
||||
<th>Herd</th>
|
||||
<th><img src="{{ MEDIA_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="{{ MEDIA_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/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
|
||||
{% if request.GET.extras %}
|
||||
<th>Graphs</th>
|
||||
{% endif %}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% block menu_feed %}
|
||||
{{ block.super }}
|
||||
<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>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<table id="table" class="display">
|
||||
<thead>
|
||||
<th>Maintainer</th>
|
||||
<th><img src="{{ MEDIA_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="{{ MEDIA_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/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
|
||||
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
|
||||
{% if request.GET.extras %}
|
||||
<th>Graphs</th>
|
||||
{% endif %}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{% block menu_feed %}
|
||||
{{ block.super }}
|
||||
<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>
|
||||
</li>
|
||||
{% endblock %}
|
||||
@@ -69,9 +69,9 @@
|
||||
{% for version in packaged %}
|
||||
<li id="{{ version.version }}-{{version.revision }}:{{ version.slot }}-[{{ version.overlay }}]">
|
||||
{% 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 %}
|
||||
<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 %}
|
||||
{{ version.version }}-{{ version.revision }} :{{ version.slot }} [{{ version.overlay }}]
|
||||
</li>
|
||||
@@ -85,7 +85,7 @@
|
||||
<ul>
|
||||
{% for version in upstream %}
|
||||
<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 }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
@@ -102,11 +102,11 @@
|
||||
<li class="removed">
|
||||
{% endif %}
|
||||
{% 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 %}
|
||||
<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 %}
|
||||
<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 %}
|
||||
{{ version }} - {{ version.datetime }}
|
||||
</li>
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
)
|
||||
|
||||
File renamed without changes.
File renamed without changes.
Whitespace-only changes.
Whitespace-only changes.
File renamed without changes.
Whitespace-only changes.
Reference in new issue
Block a user