aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README18
-rw-r--r--layerindex/forms.py13
-rw-r--r--layerindex/restviews.py4
-rw-r--r--layerindex/urls.py16
-rw-r--r--layerindex/urls_branch.py3
-rw-r--r--layerindex/utils.py6
-rw-r--r--manage.py20
-rw-r--r--requirements.txt38
-rw-r--r--settings.py2
-rw-r--r--templates/404.html2
-rw-r--r--templates/base.html22
-rw-r--r--templates/base_toplevel.html3
-rw-r--r--templates/layerindex/about.html2
-rw-r--r--templates/layerindex/bulkchange.html2
-rw-r--r--templates/layerindex/bulkchangereview.html8
-rw-r--r--templates/layerindex/bulkchangesearch.html8
-rw-r--r--templates/layerindex/classic_base.html10
-rw-r--r--templates/layerindex/classicrecipedetail.html2
-rw-r--r--templates/layerindex/classicrecipes.html10
-rw-r--r--templates/layerindex/classicstats.html4
-rw-r--r--templates/layerindex/detail.html14
-rw-r--r--templates/layerindex/duplicates.html1
-rw-r--r--templates/layerindex/editlayernote.html2
-rw-r--r--templates/layerindex/layers.html8
-rw-r--r--templates/layerindex/machines.html10
-rw-r--r--templates/layerindex/profile.html2
-rw-r--r--templates/layerindex/recipedetail.html12
-rw-r--r--templates/layerindex/recipes.html12
-rw-r--r--templates/layerindex/reviewdetail.html14
-rw-r--r--templates/layerindex/reviewlist.html2
-rw-r--r--templates/registration/activate.html2
-rw-r--r--templates/registration/activation_email.txt2
-rw-r--r--templates/registration/login.html4
-rw-r--r--templates/registration/password_reset_complete.html2
-rw-r--r--templates/registration/password_reset_email.html2
-rw-r--r--urls.py6
36 files changed, 136 insertions, 152 deletions
diff --git a/README b/README
index ff0a7a5a63..db788dfacc 100644
--- a/README
+++ b/README
@@ -11,22 +11,22 @@ Setup
In order to make use of this application you will need:
-* Django 1.4.x - tested with 1.4.1-1.4.10; newer versions may work, but
- the application has not been tested with 1.5 or newer.
+* Django 1.6.x - tested with 1.6.10; newer versions may work, but
+ the application has not been tested with 1.7 or newer.
* For production usage, a web server set up to host Django applications
(not needed for local-only testing)
* A database supported by Django (SQLite, MySQL, etc.). Django takes
care of creating the database itself, you just need to ensure that the
database server (if not using SQLite) is configured and running.
* The following third-party Django modules (tested versions listed):
- * django-south (0.8.4)
+ * django-south (1.0.2)
* django-registration (1.0)
- * django-reversion (1.7.1)
- * django-reversion-compare (0.3.5)
- * django-simple-captcha (0.4.1)
- * django-nvd3 (0.6.0)
- * djangorestframework (2.3.14)
- * django-cors-headers (0.12)
+ * django-reversion (1.8.7)
+ * django-reversion-compare (0.4.0)
+ * django-simple-captcha (0.4.6)
+ * django-nvd3 (0.9.7)
+ * djangorestframework (3.2.5)
+ * django-cors-headers (1.1.0)
* On the machine that will run the backend update script (which does not
have to be the same machine as the web server, however it does still
have to have Django installed, have the same or similar configuration
diff --git a/layerindex/forms.py b/layerindex/forms.py
index 60653cf2b4..e15dbeb433 100644
--- a/layerindex/forms.py
+++ b/layerindex/forms.py
@@ -6,7 +6,7 @@
from layerindex.models import LayerItem, LayerBranch, LayerMaintainer, LayerNote, RecipeChangeset, RecipeChange, ClassicRecipe
from django import forms
-from django.core.validators import URLValidator, RegexValidator, email_re
+from django.core.validators import URLValidator, RegexValidator, EmailValidator
from django.forms.models import inlineformset_factory, modelformset_factory
from captcha.fields import CaptchaField
from django.contrib.auth.models import User
@@ -29,9 +29,8 @@ class LayerMaintainerForm(forms.ModelForm):
if email:
if len(email) < 7:
raise forms.ValidationError('%s is not a valid email address' % email)
- reg = re.compile(email_re)
- if not reg.match(email):
- raise forms.ValidationError('%s is not a valid email address' % email)
+ val = EmailValidator()
+ val(email)
return email
@@ -115,21 +114,21 @@ class EditLayerForm(forms.ModelForm):
def clean_vcs_web_tree_base_url(self):
url = self.cleaned_data['vcs_web_tree_base_url'].strip()
if url:
- val = URLValidator(verify_exists=False)
+ val = URLValidator()
val(url)
return url
def clean_vcs_web_file_base_url(self):
url = self.cleaned_data['vcs_web_file_base_url'].strip()
if url:
- val = URLValidator(verify_exists=False)
+ val = URLValidator()
val(url)
return url
def clean_usage_url(self):
usage = self.cleaned_data['usage_url'].strip()
if usage.startswith('http'):
- val = URLValidator(verify_exists=False)
+ val = URLValidator()
val(usage)
return usage
diff --git a/layerindex/restviews.py b/layerindex/restviews.py
index 61698a9918..b33d3d19d7 100644
--- a/layerindex/restviews.py
+++ b/layerindex/restviews.py
@@ -1,6 +1,6 @@
-from models import Branch, LayerItem, LayerNote, LayerBranch, LayerDependency, Recipe, Machine
+from layerindex.models import Branch, LayerItem, LayerNote, LayerBranch, LayerDependency, Recipe, Machine
from rest_framework import viewsets, serializers
-from querysethelper import params_to_queryset, get_search_tuple
+from layerindex.querysethelper import params_to_queryset, get_search_tuple
class ParametricSearchableModelViewSet(viewsets.ModelViewSet):
def get_queryset(self):
diff --git a/layerindex/urls.py b/layerindex/urls.py
index 1bd4f0b5b1..e7808e6683 100644
--- a/layerindex/urls.py
+++ b/layerindex/urls.py
@@ -4,9 +4,8 @@
#
# Licensed under the MIT license, see COPYING.MIT for details
-from django.conf.urls.defaults import *
-from django.views.generic import TemplateView, DetailView, ListView
-from django.views.generic.simple import redirect_to
+from django.conf.urls import *
+from django.views.generic import TemplateView, DetailView, ListView, RedirectView
from django.views.defaults import page_not_found
from django.core.urlresolvers import reverse_lazy
from layerindex.views import LayerListView, LayerReviewListView, LayerReviewDetailView, RecipeSearchView, MachineSearchView, PlainTextListView, LayerDetailView, edit_layer_view, delete_layer_view, edit_layernote_view, delete_layernote_view, HistoryListView, EditProfileFormView, AdvancedRecipeSearchView, BulkChangeView, BulkChangeSearchView, bulk_change_edit_view, bulk_change_patch_view, BulkChangeDeleteView, RecipeDetailView, RedirectParamsView, ClassicRecipeSearchView, ClassicRecipeDetailView, ClassicRecipeStatsView
@@ -24,19 +23,20 @@ router.register(r'recipes', restviews.RecipeViewSet)
router.register(r'machines', restviews.MachineViewSet)
urlpatterns = patterns('',
- url(r'^$', redirect_to, {'url' : reverse_lazy('layer_list', args=('master',))},
+ url(r'^$',
+ RedirectView.as_view(url=reverse_lazy('layer_list', args=('master',))),
name='frontpage'),
url(r'^api/', include(router.urls)),
url(r'^layers/$',
- redirect_to, {'url' : reverse_lazy('layer_list', args=('master',))}),
+ RedirectView.as_view(url=reverse_lazy('layer_list', args=('master',)))),
url(r'^layer/(?P<slug>[-\w]+)/$',
RedirectParamsView.as_view(), {'redirect_name': 'layer_item', 'branch':'master'}),
url(r'^recipes/$',
- redirect_to, {'url' : reverse_lazy('recipe_search', args=('master',))}),
+ RedirectView.as_view(url=reverse_lazy('recipe_search', args=('master',)))),
url(r'^machines/$',
- redirect_to, {'url' : reverse_lazy('machine_search', args=('master',))}),
+ RedirectView.as_view(url=reverse_lazy('machine_search', args=('master',)))),
url(r'^submit/$', edit_layer_view, {'template_name': 'layerindex/submitlayer.html'}, name="submit_layer"),
url(r'^submit/thanks$',
@@ -107,7 +107,7 @@ urlpatterns = patterns('',
template_name='layerindex/about.html'),
name="about"),
url(r'^oe-classic/$',
- redirect_to, {'url' : reverse_lazy('classic_recipe_search')},
+ RedirectView.as_view(url=reverse_lazy('classic_recipe_search')),
name='classic'),
url(r'^oe-classic/recipes/$',
ClassicRecipeSearchView.as_view(
diff --git a/layerindex/urls_branch.py b/layerindex/urls_branch.py
index b0f577cf0e..ab5e2d55f1 100644
--- a/layerindex/urls_branch.py
+++ b/layerindex/urls_branch.py
@@ -4,8 +4,7 @@
#
# Licensed under the MIT license, see COPYING.MIT for details
-from django.conf.urls.defaults import *
-from django.views.generic.simple import redirect_to
+from django.conf.urls import *
from django.views.defaults import page_not_found
from django.core.urlresolvers import reverse_lazy
from layerindex.views import LayerListView, RecipeSearchView, MachineSearchView, PlainTextListView, LayerDetailView, edit_layer_view, delete_layer_view, edit_layernote_view, delete_layernote_view, RedirectParamsView, DuplicatesView
diff --git a/layerindex/utils.py b/layerindex/utils.py
index 440cc88835..ebb89d31ef 100644
--- a/layerindex/utils.py
+++ b/layerindex/utils.py
@@ -57,12 +57,6 @@ def setup_django():
sys.path.append(newpath)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
- from django.core.management import setup_environ
- from django.conf import settings
- import settings
-
- setup_environ(settings)
-
def logger_create(name):
logger = logging.getLogger(name)
loggerhandler = logging.StreamHandler()
diff --git a/manage.py b/manage.py
index 0b219fba5a..0a64562f9f 100644
--- a/manage.py
+++ b/manage.py
@@ -6,20 +6,14 @@
#
# Copyright (c) Django Software Foundation and individual contributors.
# All rights reserved.
-
+#!/usr/bin/env python
import os
-
-from django.core.management import execute_manager
-import imp
-try:
- imp.find_module('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" % __file__)
- sys.exit(1)
-
-import settings
+import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
- execute_manager(settings)
+
+ from django.core.management import execute_from_command_line
+
+ execute_from_command_line(sys.argv)
+
diff --git a/requirements.txt b/requirements.txt
index cde88a0d1a..ea5beeebaf 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,20 +1,20 @@
-Django>=1.4,<1.5
-GitPython>=0.3.7
-Jinja2==2.7.3
+Django==1.6.11
+django-cors-headers==1.1.0
+django-nvd3==0.9.7
+django-registration==1.0
+django-reversion==1.8.7
+django-reversion-compare==0.4.0
+django-simple-captcha==0.4.6
+djangorestframework==3.2.5
+gitdb==0.6.4
+GitPython==2.0.5
+Jinja2==2.8
MarkupSafe==0.23
-Pillow>=2.4.0
-South==0.8.4
-Unidecode==0.04.16
-argparse==1.2.1
-awesome-slugify==1.5
-django-cors-headers==0.12
-django-nvd3==0.7.4
-django-registration==0.8
-django-reversion==1.6.6
-django-reversion-compare==0.3.5
-django-simple-captcha==0.4.2
-djangorestframework==2.3.14
-python-nvd3==0.12.2
-regex==2014.06.28
-six==1.7.3
-wsgiref==0.1.2
+mysqlclient==1.3.7
+Pillow==3.2.0
+python-nvd3==0.14.2
+python-slugify==1.1.4
+six==1.10.0
+smmap==0.9.0
+South==1.0.2
+Unidecode==0.4.19
diff --git a/settings.py b/settings.py
index b21a5b43d0..b731a6b414 100644
--- a/settings.py
+++ b/settings.py
@@ -131,7 +131,7 @@ TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
- BASE_DIR + "/templates"
+ BASE_DIR + "/templates",
)
INSTALLED_APPS = (
diff --git a/templates/404.html b/templates/404.html
index 843d5bc42e..5bd5f750ac 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -22,7 +22,7 @@
<p>The page you requested was not found.</p>
-<p><a href="{% url frontpage %}">Return to the front page</a></p>
+<p><a href="{% url 'frontpage' %}">Return to the front page</a></p>
{% endautoescape %}
{% endblock %}
diff --git a/templates/base.html b/templates/base.html
index c872383ccd..fedcfe2151 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -28,13 +28,13 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
- <a class="brand" href="{% url frontpage %}">{{ site_name }}</a>
+ <a class="brand" href="{% url 'frontpage' %}">{{ site_name }}</a>
{% if user.is_authenticated %}
<div class="btn-group pull-right">
{% if perms.layerindex.publish_layer %}
{% if unpublished_count > 0 %}
- <a class="btn" href="{% url layer_list_review %}?branch=master">
+ <a class="btn" href="{% url 'layer_list_review' %}?branch=master">
<span class="badge badge-warning review-notification">{{ unpublished_count }}</span>
</a>
{% endif %}
@@ -45,14 +45,14 @@
<b class="caret"></b>
</button>
<ul class="dropdown-menu">
- <li><a href="{% url auth_logout %}">{% trans "Log out" %}</a></li>
- <li><a href="{% url auth_password_change %}">{% trans "Change password" %}</a></li>
- <li><a href="{% url profile %}">{% trans "Edit profile" %}</a></li>
+ <li><a href="{% url 'auth_logout' %}">{% trans "Log out" %}</a></li>
+ <li><a href="{% url 'auth_password_change' %}">{% trans "Change password" %}</a></li>
+ <li><a href="{% url 'profile' %}">{% trans "Edit profile" %}</a></li>
</ul>
</div>
{% else %}
<div class="pull-right">
- <a class="btn" href="{% url auth_login %}">{% trans "Log in" %}</a>
+ <a class="btn" href="{% url 'auth_login' %}">{% trans "Log in" %}</a>
</div>
{% endif %}
<ul class="nav pull-right">
@@ -60,7 +60,7 @@
</ul>
{% block topfunctions %}
<div class="pull-right nav-spacer">
- <a class="btn btn-info" href="{% url submit_layer %}">Submit layer</a>
+ <a class="btn btn-info" href="{% url 'submit_layer' %}">Submit layer</a>
</div>
<ul class="nav pull-right">
{% if user.is_authenticated %}
@@ -70,8 +70,8 @@
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
- <li><a href="{% url bulk_change %}">Bulk Change</a></li>
- <li><a href="{% url duplicates 'master' %}">Duplicates</a></li>
+ <li><a href="{% url 'bulk_change' %}">Bulk Change</a></li>
+ <li><a href="{% url 'duplicates' 'master' %}">Duplicates</a></li>
</ul>
</li>
{% endif %}
@@ -96,8 +96,8 @@
{% block footer %}
<hr />
<div class="footer">
- <a href="{% url history_list %}">change history</a>
- &bull; <a href="{% url about %}">about this site</a>
+ <a href="{% url 'history_list' %}">change history</a>
+ &bull; <a href="{% url 'about' %}">about this site</a>
&bull; <a href="http://www.openembedded.org/Layers_FAQ">FAQ</a>
</div>
diff --git a/templates/base_toplevel.html b/templates/base_toplevel.html
index d9ea7bb60c..c86ccc2f93 100644
--- a/templates/base_toplevel.html
+++ b/templates/base_toplevel.html
@@ -1,7 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
-{% load url from future %}
{% comment %}
layerindex-web - top level page template
@@ -56,4 +55,4 @@
</div>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/templates/layerindex/about.html b/templates/layerindex/about.html
index 67c646a748..3e9882512a 100644
--- a/templates/layerindex/about.html
+++ b/templates/layerindex/about.html
@@ -11,7 +11,7 @@
<p>This website indexes layers for the <a href="http://www.openembedded.org">OpenEmbedded</a> build system provided by members of the OpenEmbedded / Yocto Project community, suitable for use on top of OpenEmbedded-Core and compatible systems, providing additional recipes, machine support and/or distro policy configuration.</p>
-<p>If you have a layer for use with OpenEmbedded that you wish to share with others, please <a href="{% url submit_layer %}">submit it</a>!</p>
+<p>If you have a layer for use with OpenEmbedded that you wish to share with others, please <a href="{% url 'submit_layer' %}">submit it</a>!</p>
<h3>Technologies</h3>
diff --git a/templates/layerindex/bulkchange.html b/templates/layerindex/bulkchange.html
index e7fc270e5c..e8936de88a 100644
--- a/templates/layerindex/bulkchange.html
+++ b/templates/layerindex/bulkchange.html
@@ -29,7 +29,7 @@ generate a patch for these changes which can be submitted for merging.</p>
<h3>Select an existing changeset</h3>
<ul>
{% for changeset in changesets %}
- <li><a href="{% url bulk_change_search changeset.id %}">{{ changeset.name }}</a></li>
+ <li><a href="{% url 'bulk_change_search' changeset.id %}">{{ changeset.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
diff --git a/templates/layerindex/bulkchangereview.html b/templates/layerindex/bulkchangereview.html
index 5fb971eff0..a95bb5d5bf 100644
--- a/templates/layerindex/bulkchangereview.html
+++ b/templates/layerindex/bulkchangereview.html
@@ -37,10 +37,10 @@
</li>
{% endfor %}
</ul>
-<a href="{% url bulk_change_search changeset.id %}" class="btn">Add recipes</a>
-<a href="{% url bulk_change_edit changeset.id %}" class="btn">Edit</a>
-<a href="{% url bulk_change_patches changeset.id %}" class="btn">Get patches</a>
-<a href="{% url bulk_change_delete changeset.id %}?cancel=bulk_change_review" class="btn">Delete</a>
+<a href="{% url 'bulk_change_search' changeset.id %}" class="btn">Add recipes</a>
+<a href="{% url 'bulk_change_edit' changeset.id %}" class="btn">Edit</a>
+<a href="{% url 'bulk_change_patches' changeset.id %}" class="btn">Get patches</a>
+<a href="{% url 'bulk_change_delete' changeset.id %}?cancel=bulk_change_review" class="btn">Delete</a>
{% endautoescape %}
diff --git a/templates/layerindex/bulkchangesearch.html b/templates/layerindex/bulkchangesearch.html
index 134f9a3cd1..0cb83ff7e6 100644
--- a/templates/layerindex/bulkchangesearch.html
+++ b/templates/layerindex/bulkchangesearch.html
@@ -78,10 +78,10 @@
{% for recipe in recipe_list %}
<tr>
<td><input type="checkbox" name="selecteditems" value="{{ recipe.id }}"></input></td>
- <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td>
+ <td><a href="{% url 'recipe' recipe.id %}">{{ recipe.name }}</a></td>
<td>{{ recipe.pv }}</td>
<td>{{ recipe.short_desc }}</td>
- <td><a href="{% url layer_item current_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
+ <td><a href="{% url 'layer_item' current_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
</tr>
{% endfor %}
</tbody>
@@ -120,9 +120,9 @@
</ul>
</small>
<input type="submit" class="btn" name="remove_all" value="Remove all"></input>
- <a href="{% url bulk_change_edit changeset.id %}" class="btn">Edit</a>
+ <a href="{% url 'bulk_change_edit' changeset.id %}" class="btn">Edit</a>
{% endif %}
- <a href="{% url bulk_change_delete changeset.id %}?cancel=bulk_change_search" class="btn">Delete</a>
+ <a href="{% url 'bulk_change_delete' changeset.id %}?cancel=bulk_change_search" class="btn">Delete</a>
</div>
{% endif %}
</form>
diff --git a/templates/layerindex/classic_base.html b/templates/layerindex/classic_base.html
index eab56f2645..7ba63f51ee 100644
--- a/templates/layerindex/classic_base.html
+++ b/templates/layerindex/classic_base.html
@@ -24,7 +24,7 @@
</a>
<ul class="dropdown-menu">
{% for branch in all_branches %}
- <li><a href="{% url layer_list branch.name %}">
+ <li><a href="{% url 'layer_list' branch.name %}">
{{ branch.name }}
{% if branch.short_description %}
({{ branch.short_description }})
@@ -32,7 +32,7 @@
</a></li>
{% endfor %}
<li class="divider"></li>
- <li><a href="{% url classic %}"><b>OE-Classic</b></a></li>
+ <li><a href="{% url 'classic' %}"><b>OE-Classic</b></a></li>
</ul>
</li>
{% endautoescape %}
@@ -48,9 +48,9 @@
<p>OpenEmbedded-Classic (OE-Classic) is the name for the old monolithic version of OpenEmbedded. It contained a number of recipes some of which have not yet been migrated on top of OE-Core. To help people to find and migrate these recipes we provide an index here as well as some statistics to get an idea of the migration.</p>
- <a class="btn btn-large btn-primary" href="{% url classic_recipe_search %}">Recipes</a>
- <a class="btn btn-large" href="{% url classic_recipe_search %}?q=&cover_status=!">Unmigrated Recipes</a>
- <a class="btn btn-large btn-primary" href="{% url classic_recipe_stats %}">Stats</a>
+ <a class="btn btn-large btn-primary" href="{% url 'classic_recipe_search' %}">Recipes</a>
+ <a class="btn btn-large" href="{% url 'classic_recipe_search' %}?q=&cover_status=!">Unmigrated Recipes</a>
+ <a class="btn btn-large btn-primary" href="{% url 'classic_recipe_stats' %}">Stats</a>
</div>
</div>
diff --git a/templates/layerindex/classicrecipedetail.html b/templates/layerindex/classicrecipedetail.html
index 9df9a844e8..45d845f394 100644
--- a/templates/layerindex/classicrecipedetail.html
+++ b/templates/layerindex/classicrecipedetail.html
@@ -21,7 +21,7 @@
{% autoescape on %}
<ul class="breadcrumb">
- <li><a href="{% url classic_recipe_search %}">OE-Classic</a> <span class="divider">&rarr;</span></li>
+ <li><a href="{% url 'classic_recipe_search' %}">OE-Classic</a> <span class="divider">&rarr;</span></li>
<li class="active">{{ recipe.name }}</li>
</ul>
diff --git a/templates/layerindex/classicrecipes.html b/templates/layerindex/classicrecipes.html
index 7fb62be6cf..799dbb41eb 100644
--- a/templates/layerindex/classicrecipes.html
+++ b/templates/layerindex/classicrecipes.html
@@ -17,8 +17,8 @@
{% block navs %}
{% autoescape on %}
- <li class="active"><a href="{% url classic_recipe_search %}">Recipes</a></li>
- <li><a href="{% url classic_recipe_stats %}">Stats</a></li>
+ <li class="active"><a href="{% url 'classic_recipe_search' %}">Recipes</a></li>
+ <li><a href="{% url 'classic_recipe_stats' %}">Stats</a></li>
{% endautoescape %}
{% endblock %}
@@ -31,7 +31,7 @@
<h2>OE-Classic recipes</h2>
<div class="alert alert-warning">
- <b>NOTE:</b> This is the recipe search for OE-Classic, the older monolithic version of OpenEmbedded which is no longer actively developed. <a href="{% url recipe_search 'master' %}">Click here</a> to search current recipes.
+ <b>NOTE:</b> This is the recipe search for OE-Classic, the older monolithic version of OpenEmbedded which is no longer actively developed. <a href="{% url 'recipe_search' 'master' %}">Click here</a> to search current recipes.
</div>
<div class="row-fluid">
@@ -72,13 +72,13 @@
<tbody>
{% for recipe in recipe_list %}
<tr {% if recipe.preferred_count > 0 %}class="muted"{% endif %}>
- <td><a href="{% url classic_recipe recipe.id %}">{{ recipe.name }}</a></td>
+ <td><a href="{% url 'classic_recipe' recipe.id %}">{{ recipe.name }}</a></td>
<td>{{ recipe.pv }}</td>
<td>{{ recipe.short_desc }}</td>
<td>{{ recipe.get_cover_desc }}</td>
<td>{{ recipe.classic_category }}</td>
{% if multi_classic_layers %}
- <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
+ <td><a href="{% url 'layer_item' recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
{% endif %}
</tr>
{% endfor %}
diff --git a/templates/layerindex/classicstats.html b/templates/layerindex/classicstats.html
index 2fde01b973..63d0b43288 100644
--- a/templates/layerindex/classicstats.html
+++ b/templates/layerindex/classicstats.html
@@ -19,8 +19,8 @@
{% block navs %}
{% autoescape on %}
- <li><a href="{% url classic_recipe_search %}">Recipes</a></li>
- <li class="active"><a href="{% url classic_recipe_stats %}">Stats</a></li>
+ <li><a href="{% url 'classic_recipe_search' %}">Recipes</a></li>
+ <li class="active"><a href="{% url 'classic_recipe_stats' %}">Stats</a></li>
{% endautoescape %}
{% endblock %}
diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html
index feb2c6c2c5..d0d11c05b0 100644
--- a/templates/layerindex/detail.html
+++ b/templates/layerindex/detail.html
@@ -22,7 +22,7 @@
{% autoescape on %}
<ul class="breadcrumb">
- <li><a href="{% url layer_list url_branch %}">{{ layerbranch.branch.name }}</a> <span class="divider">&rarr;</span></li>
+ <li><a href="{% url 'layer_list' url_branch %}">{{ layerbranch.branch.name }}</a> <span class="divider">&rarr;</span></li>
<li class="active">{{ layeritem.name }}</li>
</ul>
@@ -36,9 +36,9 @@
{% if user.is_authenticated %}
<span class="pull-right">
{% if perms.layerindex.publish_layer or useredit %}
- <a href="{% url edit_layer url_branch layeritem.name %}" class="btn">Edit layer</a>
+ <a href="{% url 'edit_layer' url_branch layeritem.name %}" class="btn">Edit layer</a>
{% if layeritem.layernote_set.count = 0 %}
- <a href="{% url add_layernote layeritem.name %}" class="btn">Add note</a>
+ <a href="{% url 'add_layernote' layeritem.name %}" class="btn">Add note</a>
{% endif %}
{% endif %}
</span>
@@ -63,8 +63,8 @@
{% if perms.layerindex.publish_layer or useredit %}
<br><br>
<p>
- <a href="{% url edit_layernote layeritem.name note.pk %}" class="btn">Edit note</a>
- <a href="{% url delete_layernote layeritem.name note.pk %}" class='btn'>Delete note</a>
+ <a href="{% url 'edit_layernote' layeritem.name note.pk %}" class="btn">Edit note</a>
+ <a href="{% url 'delete_layernote' layeritem.name note.pk %}" class='btn'>Delete note</a>
</p>
{% endif %}
</div>
@@ -144,7 +144,7 @@
<p>The {{ layeritem.name }} layer depends upon:</p>
<ul>
{% for dep in layerbranch.dependencies_set.all %}
- <li><a href="{% url layer_item url_branch dep.dependency.name %}">{{ dep.dependency.name }}</a></li>
+ <li><a href="{% url 'layer_item' url_branch dep.dependency.name %}">{{ dep.dependency.name }}</a></li>
{% endfor %}
</ul>
</div> <!-- end of well -->
@@ -198,7 +198,7 @@
<tbody>
{% for recipe in layerbranch.sorted_recipes %}
<tr>
- <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a>{% if 'image' in recipe.inherits.split %}<i class="icon-hdd"></i>{% endif %}{% if recipe.blacklisted %}<span class="label label-inverse" title="{{ recipe.blacklisted }}">blacklisted</span>{% endif %}</td>
+ <td><a href="{% url 'recipe' recipe.id %}">{{ recipe.name }}</a>{% if 'image' in recipe.inherits.split %}<i class="icon-hdd"></i>{% endif %}{% if recipe.blacklisted %}<span class="label label-inverse" title="{{ recipe.blacklisted }}">blacklisted</span>{% endif %}</td>
<td>{{ recipe.pv }}</td>
<td class="span8">{{ recipe.short_desc }}</td>
</tr>
diff --git a/templates/layerindex/duplicates.html b/templates/layerindex/duplicates.html
index 116aab9df6..0ebfe1185a 100644
--- a/templates/layerindex/duplicates.html
+++ b/templates/layerindex/duplicates.html
@@ -1,6 +1,5 @@
{% extends "base_toplevel.html" %}
{% load i18n %}
-{% load url from future %}
{% comment %}
diff --git a/templates/layerindex/editlayernote.html b/templates/layerindex/editlayernote.html
index 1c7693c6bb..abf82993c3 100644
--- a/templates/layerindex/editlayernote.html
+++ b/templates/layerindex/editlayernote.html
@@ -25,7 +25,7 @@
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save" class='btn' />
-<a href="{% url layer_item 'master' form.instance.layer.name %}" class='btn'>Cancel</a>
+<a href="{% url 'layer_item' 'master' form.instance.layer.name %}" class='btn'>Cancel</a>
</form>
{% endautoescape %}
diff --git a/templates/layerindex/layers.html b/templates/layerindex/layers.html
index 4ca43fc836..cfc4ebd078 100644
--- a/templates/layerindex/layers.html
+++ b/templates/layerindex/layers.html
@@ -18,9 +18,9 @@
{% block navs %}
{% autoescape on %}
- <li class="active"><a href="{% url layer_list url_branch %}">Layers</a></li>
- <li><a href="{% url recipe_search url_branch %}">Recipes</a></li>
- <li><a href="{% url machine_search url_branch %}">Machines</a></li>
+ <li class="active"><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
+ <li><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
+ <li><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
{% endautoescape %}
{% endblock %}
@@ -71,7 +71,7 @@
<tbody>
{% for layerbranch in layerbranch_list %}
<tr class="layertype_{{ layerbranch.layer.layer_type }}">
- <td><a href="{% url layer_item url_branch layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td>
+ <td><a href="{% url 'layer_item' url_branch layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td>
<td>{{ layerbranch.layer.summary }}</td>
<td>{{ layerbranch.layer.get_layer_type_display }}</td>
<td class="showRollie">
diff --git a/templates/layerindex/machines.html b/templates/layerindex/machines.html
index 1851937d17..e31433c0a6 100644
--- a/templates/layerindex/machines.html
+++ b/templates/layerindex/machines.html
@@ -17,9 +17,9 @@
{% block navs %}
{% autoescape on %}
- <li><a href="{% url layer_list url_branch %}">Layers</a></li>
- <li><a href="{% url recipe_search url_branch %}">Recipes</a></li>
- <li class="active"><a href="{% url machine_search url_branch %}">Machines</a></li>
+ <li><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
+ <li><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
+ <li class="active"><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
{% endautoescape %}
{% endblock %}
@@ -30,7 +30,7 @@
<div class="row-fluid">
<div class="input-append">
- <form id="filter-form" action="{% url machine_search url_branch %}" method="get">
+ <form id="filter-form" action="{% url 'machine_search' url_branch %}" method="get">
<input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search machines" name="q" value="{{ search_keyword }}" />
<button class="btn" type="submit">search</button>
</form>
@@ -52,7 +52,7 @@
<tr>
<td><a href="{{ machine.vcs_web_url }}">{{ machine.name }}</a></td>
<td>{{ machine.description }}</td>
- <td><a href="{% url layer_item url_branch machine.layerbranch.layer.name %}">{{ machine.layerbranch.layer.name }}</a></td>
+ <td><a href="{% url 'layer_item' url_branch machine.layerbranch.layer.name %}">{{ machine.layerbranch.layer.name }}</a></td>
</tr>
{% endfor %}
</tbody>
diff --git a/templates/layerindex/profile.html b/templates/layerindex/profile.html
index 8edc451257..d6d25cec8e 100644
--- a/templates/layerindex/profile.html
+++ b/templates/layerindex/profile.html
@@ -42,7 +42,7 @@
{% endfor %}
<input type="submit" class="btn" value="{% trans 'Save' %}" />
- <a class="btn" href="{% url frontpage %}">{% trans 'Cancel' %}</a>
+ <a class="btn" href="{% url 'frontpage' %}">{% trans 'Cancel' %}</a>
{% csrf_token %}
</form>
diff --git a/templates/layerindex/recipedetail.html b/templates/layerindex/recipedetail.html
index 7dbb362d40..c0199a1530 100644
--- a/templates/layerindex/recipedetail.html
+++ b/templates/layerindex/recipedetail.html
@@ -21,8 +21,8 @@
{% autoescape on %}
<ul class="breadcrumb">
- <li><a href="{% url layer_list recipe.layerbranch.branch.name %}">{{ recipe.layerbranch.branch.name }}</a> <span class="divider">&rarr;</span></li>
- <li><a href="{% url layer_item recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> <span class="divider">&rarr;</span></li>
+ <li><a href="{% url 'layer_list' recipe.layerbranch.branch.name %}">{{ recipe.layerbranch.branch.name }}</a> <span class="divider">&rarr;</span></li>
+ <li><a href="{% url 'layer_item' recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> <span class="divider">&rarr;</span></li>
<li class="active">{{ recipe.name }}</li>
</ul>
@@ -36,7 +36,7 @@
{% if recipe.blacklisted %}
<div class="alert">
<div class="row-fluid">
- <p>This recipe is <strong>blacklisted</strong> by the <a href="{% url layer_item recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> layer. The reason provided is:</p>
+ <p>This recipe is <strong>blacklisted</strong> by the <a href="{% url 'layer_item' recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> layer. The reason provided is:</p>
<blockquote class="span7 warn">
<p>{{ recipe.blacklisted }}</p>
</blockquote>
@@ -92,7 +92,7 @@
</tr>
<tr>
<th>Layer</th>
- <td><a href="{% url layer_item recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> ({{ recipe.layerbranch.branch.name}} branch)</td>
+ <td><a href="{% url 'layer_item' recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> ({{ recipe.layerbranch.branch.name}} branch)</td>
</tr>
<tr>
<th>Inherits</th>
@@ -116,7 +116,7 @@
{% for append in verappends %}
<tr>
<td>
- <a href="{% url layer_item append.layerbranch.branch.name append.layerbranch.layer.name %}">{{ append.layerbranch.layer.name }}</a>
+ <a href="{% url 'layer_item' append.layerbranch.branch.name append.layerbranch.layer.name %}">{{ append.layerbranch.layer.name }}</a>
</td>
<td>
<a href="{{ append.vcs_web_url }}">{{ append.filename }}</a>
@@ -127,7 +127,7 @@
{% if not append in verappends %}
<tr>
<td>
- <a href="{% url layer_item append.layerbranch.branch.name append.layerbranch.layer.name %}" class="muted">{{ append.layerbranch.layer.name }}</a>
+ <a href="{% url 'layer_item' append.layerbranch.branch.name append.layerbranch.layer.name %}" class="muted">{{ append.layerbranch.layer.name }}</a>
</td>
<td>
<a href="{{ append.vcs_web_url }}" class="muted">{{ append.filename }}</a>
diff --git a/templates/layerindex/recipes.html b/templates/layerindex/recipes.html
index c2141a4073..74f3bb431e 100644
--- a/templates/layerindex/recipes.html
+++ b/templates/layerindex/recipes.html
@@ -17,9 +17,9 @@
{% block navs %}
{% autoescape on %}
- <li><a href="{% url layer_list url_branch %}">Layers</a></li>
- <li class="active"><a href="{% url recipe_search url_branch %}">Recipes</a></li>
- <li><a href="{% url machine_search url_branch %}">Machines</a></li>
+ <li><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
+ <li class="active"><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
+ <li><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
{% endautoescape %}
{% endblock %}
@@ -31,7 +31,7 @@
<div class="row-fluid">
<div class="input-append">
- <form id="filter-form" action="{% url recipe_search url_branch %}" method="get">
+ <form id="filter-form" action="{% url 'recipe_search' url_branch %}" method="get">
<input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search recipes" name="q" value="{{ search_keyword }}" />
<button class="btn" type="submit">search</button>
</form>
@@ -52,10 +52,10 @@
<tbody>
{% for recipe in recipe_list %}
<tr {% if recipe.preferred_count > 0 %}class="muted"{% endif %}>
- <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a>{% if 'image' in recipe.inherits.split %}<i class="icon-hdd"></i>{% endif %}{% if recipe.blacklisted %}<span class="label label-inverse" title="{{ recipe.blacklisted }}">blacklisted</span>{% endif %}</td>
+ <td><a href="{% url 'recipe' recipe.id %}">{{ recipe.name }}</a>{% if 'image' in recipe.inherits.split %}<i class="icon-hdd"></i>{% endif %}{% if recipe.blacklisted %}<span class="label label-inverse" title="{{ recipe.blacklisted }}">blacklisted</span>{% endif %}</td>
<td>{{ recipe.pv }}</td>
<td>{{ recipe.short_desc }}</td>
- <td><a href="{% url layer_item url_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
+ <td><a href="{% url 'layer_item' url_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
</tr>
{% endfor %}
</tbody>
diff --git a/templates/layerindex/reviewdetail.html b/templates/layerindex/reviewdetail.html
index 5840e25f4c..cff1731552 100644
--- a/templates/layerindex/reviewdetail.html
+++ b/templates/layerindex/reviewdetail.html
@@ -35,14 +35,14 @@
{% if user.is_authenticated %}
<span class="pull-right">
{% if perms.layerindex.publish_layer or useredit %}
- <a href="{% url edit_layer 'master' layeritem.name %}?returnto=layer_review" class="btn">Edit layer</a>
+ <a href="{% url 'edit_layer' 'master' layeritem.name %}?returnto=layer_review" class="btn">Edit layer</a>
{% if layeritem.layernote_set.count = 0 %}
- <a href="{% url add_layernote layeritem.name %}" class="btn">Add note</a>
+ <a href="{% url 'add_layernote' layeritem.name %}" class="btn">Add note</a>
{% endif %}
{% endif %}
{% if layeritem.status = "N" and perms.layerindex.publish_layer %}
- <a href="{% url delete_layer layeritem.name %}" class="btn btn-warning">Delete layer</a>
- <a href="{% url publish layeritem.name %}" class="btn btn-primary">Publish layer</a>
+ <a href="{% url 'delete_layer' layeritem.name %}" class="btn btn-warning">Delete layer</a>
+ <a href="{% url 'publish' layeritem.name %}" class="btn btn-primary">Publish layer</a>
{% endif %}
</span>
{% endif %}
@@ -58,8 +58,8 @@
<p>{{ note.text }}</p>
{% if perms.layerindex.publish_layer or useredit %}
<p>
- <a href="{% url edit_layernote layeritem.name note.pk %}" class="btn">Edit note</a>
- <a href="{% url delete_layernote layeritem.name note.pk %}" class='btn'>Delete note</a>
+ <a href="{% url 'edit_layernote' layeritem.name note.pk %}" class="btn">Edit note</a>
+ <a href="{% url 'delete_layernote' layeritem.name note.pk %}" class='btn'>Delete note</a>
</p>
{% endif %}
</div>
@@ -163,7 +163,7 @@
<td>
<ul class="unstyled">
{% for dep in layerbranch.dependencies_set.all %}
- <li><a href="{% url layer_item 'master' dep.dependency.name %}">{{ dep.dependency.name }}</a></li>
+ <li><a href="{% url 'layer_item' 'master' dep.dependency.name %}">{{ dep.dependency.name }}</a></li>
{% endfor %}
</ul>
</td>
diff --git a/templates/layerindex/reviewlist.html b/templates/layerindex/reviewlist.html
index d20001aa0e..eaa24e4e64 100644
--- a/templates/layerindex/reviewlist.html
+++ b/templates/layerindex/reviewlist.html
@@ -36,7 +36,7 @@
<tbody>
{% for layerbranch in layerbranch_list %}
<tr class="layertype_{{ layerbranch.layer.layer_type }}">
- <td><a href="{% url layer_review layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td>
+ <td><a href="{% url 'layer_review' layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td>
<td>{{ layerbranch.layer.summary }}</td>
<td>{{ layerbranch.layer.get_layer_type_display }}</td>
<td class="showRollie">
diff --git a/templates/registration/activate.html b/templates/registration/activate.html
index e85121e054..6e248906ad 100644
--- a/templates/registration/activate.html
+++ b/templates/registration/activate.html
@@ -7,7 +7,7 @@
<p>{% trans "Account successfully activated" %}</p>
-<p><a href="{% url auth_login %}">{% trans "Log in" %}</a></p>
+<p><a href="{% url "auth_login" %}">{% trans "Log in" %}</a></p>
{% else %}
diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt
index 0820fcede4..736ea8afa3 100644
--- a/templates/registration/activation_email.txt
+++ b/templates/registration/activation_email.txt
@@ -7,7 +7,7 @@ link is valid for {{ expiration_days }} days.
{% endblocktrans %}
-http://{{ site.domain }}{% url registration_activate activation_key %}
+http://{{ site.domain }}{% url "registration_activate" activation_key %}
{% blocktrans %}
If you did not make this request, please ignore this message.
diff --git a/templates/registration/login.html b/templates/registration/login.html
index 7e3d615238..7f8a15327f 100644
--- a/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -10,8 +10,8 @@
{% csrf_token %}
</form>
-<p>{% trans "Forgot password" %}? <a href="{% url auth_password_reset %}">{% trans "Reset it" %}</a>!</p>
-<p>{% trans "Don't have an account" %}? <a href="{% url registration_register %}">{% trans "Create one now" %}</a>!</p>
+<p>{% trans "Forgot password" %}? <a href="{% url "auth_password_reset" %}">{% trans "Reset it" %}</a>!</p>
+<p>{% trans "Don't have an account" %}? <a href="{% url "registration_register" %}">{% trans "Create one now" %}</a>!</p>
{% endblock %}
diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html
index ef3637c709..d9f3879c6b 100644
--- a/templates/registration/password_reset_complete.html
+++ b/templates/registration/password_reset_complete.html
@@ -5,6 +5,6 @@
<p>{% trans "Password reset successfully" %}</p>
-<p><a href="{% url auth_login %}">{% trans "Log in" %}</a></p>
+<p><a href="{% url "auth_login" %}">{% trans "Log in" %}</a></p>
{% endblock %}
diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html
index a55c86958b..f219c683e1 100644
--- a/templates/registration/password_reset_email.html
+++ b/templates/registration/password_reset_email.html
@@ -1,5 +1,5 @@
{% load i18n %}
{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
{% block reset_link %}
-{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uidb36=uid, token=token %}
+{{ protocol }}://{{ domain }}{% url "auth_password_reset_confirm" uidb36=uid, token=token %}
{% endblock %}
diff --git a/urls.py b/urls.py
index aa4f8c5d21..98fc734814 100644
--- a/urls.py
+++ b/urls.py
@@ -5,8 +5,8 @@
# Copyright (c) Django Software Foundation and individual contributors.
# All rights reserved.
-from django.conf.urls.defaults import patterns, include, url
-from django.views.generic.simple import redirect_to
+from django.conf.urls import patterns, include, url
+from django.views.generic import RedirectView
from django.contrib import admin
admin.autodiscover()
@@ -16,6 +16,6 @@ urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^captcha/', include('captcha.urls')),
- url(r'.*', redirect_to, {'url' : '/layerindex/'})
+ url(r'.*', RedirectView.as_view(url='/layerindex/')),
)