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 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

View File

@ -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)

View File

@ -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:

View File

@ -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

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
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)

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 %}" />
{% 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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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>

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