summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-06-24 17:05:12 -0500
committerDan McGee <dan@archlinux.org>2010-06-24 17:08:00 -0500
commite361a1e8731ce08f7a632b3914e7a0454191e01d (patch)
tree34214df7ba8e7fa9a2065070a09ddda757ec5a80
parent081ed6c8661bbec81cdbb9029e4832b34805f37b (diff)
Get unit tests up and running again
We had some dependency issues between migrations that needed to be explicitly defined in order to get things fully moving, and do to some braindeadness in Django tests not including the project url config, we need to do some clever business when using the url tag in the base template so tests don't doe with a NoReverseMatch exception. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--main/migrations/0016_always_fill_pkgbase.py2
-rw-r--r--packages/migrations/0002_populate_package_relation.py4
-rw-r--r--templates/base.html6
3 files changed, 6 insertions, 6 deletions
diff --git a/main/migrations/0016_always_fill_pkgbase.py b/main/migrations/0016_always_fill_pkgbase.py
index 154122fe..8f556593 100644
--- a/main/migrations/0016_always_fill_pkgbase.py
+++ b/main/migrations/0016_always_fill_pkgbase.py
@@ -6,8 +6,6 @@ from django.db import models
class Migration(DataMigration):
- no_dry_run = True
-
def forwards(self, orm):
orm.Package.objects.filter(pkgbase=None).update(pkgbase=models.F('pkgname'))
diff --git a/packages/migrations/0002_populate_package_relation.py b/packages/migrations/0002_populate_package_relation.py
index 7f903503..738e068f 100644
--- a/packages/migrations/0002_populate_package_relation.py
+++ b/packages/migrations/0002_populate_package_relation.py
@@ -6,7 +6,9 @@ from django.db import models
class Migration(DataMigration):
- no_dry_run = True
+ depends_on = (
+ ("main", "0003_migrate_maintainer"),
+ )
def forwards(self, orm):
"Write your forwards methods here."
diff --git a/templates/base.html b/templates/base.html
index a17ac54d..c575dd5e 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="/media/archweb-print.css" media="print" />
<link rel="icon" type="image/x-icon" href="/media/favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="/media/favicon.ico" />
- <link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch-packages %}" title="Arch Linux Packages" />
+ <link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch-packages as osp %}{{ osp }}" title="Arch Linux Packages" />
{% block head %}{% endblock %}
</head>
<body class="{% if user.is_authenticated %}devmode {% endif %}{% block bodyclass %}{% endblock %}">
@@ -23,7 +23,7 @@
<li id="anb-wiki"><a href="http://wiki.archlinux.org/" title="Community documentation">Wiki</a></li>
<li id="anb-bugs"><a href="http://bugs.archlinux.org/" title="Report and track bugs">Bugs</a></li>
<li id="anb-aur"><a href="http://aur.archlinux.org/" title="Arch Linux User Repository">AUR</a></li>
- <li id="anb-download"><a href="{% url page-download %}" title="Get Arch Linux">Download</a></li>
+ <li id="anb-download"><a href="{% url page-download as pdl %}{{ pdl }}" title="Get Arch Linux">Download</a></li>
</ul>
</div>
</div><!-- #archnavbar -->
@@ -36,7 +36,7 @@
<li><a href="http://wiki.archlinux.org/index.php/DeveloperWiki"
title="Developer HOWTOs and documentation">DevWiki</a></li>
<li><a href="http://projects.archlinux.org/" title="Git Projects">Projects</a></li>
- <li><a href="{% url news-list %}" title="Manage news articles">News</a></li>
+ <li><a href="{% url news-list as newsl %}{{ newsl }}" title="Manage news articles">News</a></li>
<li><a href="/packages/signoffs/" title="Package signoffs">Signoffs</a></li>
<li><a href="/todo/" title="Developer to-do lists">Todos</a></li>
<li><a href="http://www.archlinux.org/mailman/private/arch-dev/"