From patchwork Tue Jan 15 04:19:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 14035 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B175D24229 for ; Tue, 15 Jan 2013 04:19:15 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 28DBAA19487 for ; Tue, 15 Jan 2013 04:19:15 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so4298145vbb.17 for ; Mon, 14 Jan 2013 20:19:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:content-type:mime-version:x-launchpad-project :x-launchpad-branch:x-launchpad-message-rationale :x-launchpad-branch-revision-number:x-launchpad-notification-type:to :from:subject:message-id:date:reply-to:sender:errors-to:precedence :x-generated-by:x-launchpad-hash:x-gm-message-state; bh=5Bq8XZWCzyDYe5OQuSDcUoNFoMDDMFiOk5GnW+c4xg4=; b=TgnAJBBagT4HqN7PHuU//V4F8ia9TgiCoYXhqQsD+kFxSdOVZfiSHuPw+GGVGS0jKL 7ZBj7SBo/qM79XvVn1eaEco1K8Rvf/aRWPf3Hej1IV2BBvlaSgswwGB9/2PbkJfjlQkA 5dueRIrlIfFDwV3tI6uI9kNIGAfUGfTsnbGq1B0cSV/tCAwwSqGA9inURpSB2x7mj2rO qYdYHdkRncKEZ2OhGRbrKcuAgkDEOcH45NPeBDSHYnIu4UHxTohRYIDXQdpzs43r7jT3 duW3gCI1Y+FoZjwhJ7c/TD14XeRmnuCl42z8yJhrvY4m+F4xvtWvEi2DFIpErxmHYnFA mScQ== X-Received: by 10.58.247.132 with SMTP id ye4mr108008569vec.9.1358223554631; Mon, 14 Jan 2013 20:19:14 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp93412veb; Mon, 14 Jan 2013 20:19:13 -0800 (PST) X-Received: by 10.194.119.5 with SMTP id kq5mr138713417wjb.48.1358223553289; Mon, 14 Jan 2013 20:19:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id cp2si1532616wib.30.2013.01.14.20.19.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 20:19:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TuxzU-0008Ac-MO for ; Tue, 15 Jan 2013 04:19:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 952F3E0354 for ; Tue, 15 Jan 2013 04:19:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 407 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 407: fix south migration issues from last commit Message-Id: <20130115041912.18205.72889.launchpad@ackee.canonical.com> Date: Tue, 15 Jan 2013 04:19:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16420"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 9d9b99e199bd6ae33ddca03fe685e9139bf2f9c9 X-Gm-Message-State: ALoCoQkC6I6s+P1cJwPyPBcb0Tf2awiwqlfWDRFk5u1oMBDY1cUVQUasDpNX53Exs7g0SYf6kVbC ------------------------------------------------------------ revno: 407 committer: Andy Doan branch nick: lava-server timestamp: Mon 2013-01-14 15:26:37 -0600 message: fix south migration issues from last commit Basically you can't just delete an extension that's made changes to our DB. So this keeps the minimal amount of stuff around from the extension. added: lava_projects/ lava_projects/__init__.py lava_projects/extension.py lava_projects/migrations/ lava_projects/migrations/0001_add_model_Project.py lava_projects/migrations/0002_add_model_ProjectFormerIdentifier.py lava_projects/migrations/0003_auto__del_projectformeridentifier__del_project.py lava_projects/migrations/__init__.py modified: lava_server/extension.py setup.py --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === added directory 'lava_projects' === added file 'lava_projects/__init__.py' --- lava_projects/__init__.py 1970-01-01 00:00:00 +0000 +++ lava_projects/__init__.py 2013-01-14 21:26:37 +0000 @@ -0,0 +1,19 @@ +# Copyright (C) 2010, 2011 Linaro Limited +# +# Author: Zygmunt Krynicki +# +# This file is part of LAVA Server. +# +# LAVA Server is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License version 3 +# as published by the Free Software Foundation +# +# LAVA Server is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with LAVA Server. If not, see . + +__version__ = (0, 1, 0, "final", 0) === added file 'lava_projects/extension.py' --- lava_projects/extension.py 1970-01-01 00:00:00 +0000 +++ lava_projects/extension.py 2013-01-14 21:26:37 +0000 @@ -0,0 +1,33 @@ +# Copyright (C) 2010, 2011 Linaro Limited +# +# Author: Zygmunt Krynicki +# +# This file is part of LAVA Server. +# +# LAVA Server is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License version 3 +# as published by the Free Software Foundation +# +# LAVA Server is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with LAVA Server. If not, see . + +from lava_server.extension import DeprecatedExtension + + +class ProjectExtension(DeprecatedExtension): + """ + This has been deprecated but is just in place for south database migrations + """ + + @property + def app_name(self): + return "lava_projects" + + @property + def name(self): + return "Projects" === added directory 'lava_projects/migrations' === added file 'lava_projects/migrations/0001_add_model_Project.py' --- lava_projects/migrations/0001_add_model_Project.py 1970-01-01 00:00:00 +0000 +++ lava_projects/migrations/0001_add_model_Project.py 2013-01-14 21:26:37 +0000 @@ -0,0 +1,91 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding model 'Project' + db.create_table('lava_projects_project', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), + ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'], null=True, blank=True)), + ('is_public', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('identifier', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=100, db_index=True)), + ('description', self.gf('django.db.models.fields.TextField')(blank=True)), + ('is_aggregate', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('registered_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='projects', to=orm['auth.User'])), + ('registered_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + )) + db.send_create_signal('lava_projects', ['Project']) + + + def backwards(self, orm): + + # Deleting model 'Project' + db.delete_table('lava_projects_project') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'lava_projects.project': { + 'Meta': {'object_name': 'Project'}, + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'identifier': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}), + 'is_aggregate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'registered_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects'", 'to': "orm['auth.User']"}), + 'registered_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'lava_projects.projectfomeridentifier': { + 'Meta': {'object_name': 'ProjectFomerIdentifier'}, + 'former_identifier': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'project': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'former_identifiers'", 'to': "orm['lava_projects.Project']"}) + } + } + + complete_apps = ['lava_projects'] === added file 'lava_projects/migrations/0002_add_model_ProjectFormerIdentifier.py' --- lava_projects/migrations/0002_add_model_ProjectFormerIdentifier.py 1970-01-01 00:00:00 +0000 +++ lava_projects/migrations/0002_add_model_ProjectFormerIdentifier.py 2013-01-14 21:26:37 +0000 @@ -0,0 +1,88 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding model 'ProjectFormerIdentifier' + db.create_table('lava_projects_projectformeridentifier', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('project', self.gf('django.db.models.fields.related.ForeignKey')(related_name='former_identifiers', to=orm['lava_projects.Project'])), + ('former_identifier', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=100, db_index=True)), + ('renamed_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='project_former_identifiers_created', to=orm['auth.User'])), + ('renamed_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + )) + db.send_create_signal('lava_projects', ['ProjectFormerIdentifier']) + + + def backwards(self, orm): + + # Deleting model 'ProjectFormerIdentifier' + db.delete_table('lava_projects_projectformeridentifier') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'lava_projects.project': { + 'Meta': {'object_name': 'Project'}, + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'identifier': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}), + 'is_aggregate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'registered_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects'", 'to': "orm['auth.User']"}), + 'registered_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) + }, + 'lava_projects.projectformeridentifier': { + 'Meta': {'object_name': 'ProjectFormerIdentifier'}, + 'former_identifier': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'project': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'former_identifiers'", 'to': "orm['lava_projects.Project']"}), + 'renamed_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_former_identifiers_created'", 'to': "orm['auth.User']"}), + 'renamed_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['lava_projects'] === added file 'lava_projects/migrations/0003_auto__del_projectformeridentifier__del_project.py' --- lava_projects/migrations/0003_auto__del_projectformeridentifier__del_project.py 1970-01-01 00:00:00 +0000 +++ lava_projects/migrations/0003_auto__del_projectformeridentifier__del_project.py 2013-01-14 21:26:37 +0000 @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Deleting model 'ProjectFormerIdentifier' + db.delete_table('lava_projects_projectformeridentifier') + + # Deleting model 'Project' + db.delete_table('lava_projects_project') + + + def backwards(self, orm): + # Adding model 'ProjectFormerIdentifier' + db.create_table('lava_projects_projectformeridentifier', ( + ('renamed_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='project_former_identifiers_created', to=orm['auth.User'])), + ('renamed_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('project', self.gf('django.db.models.fields.related.ForeignKey')(related_name='former_identifiers', to=orm['lava_projects.Project'])), + ('former_identifier', self.gf('django.db.models.fields.SlugField')(max_length=100, unique=True, db_index=True)), + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + )) + db.send_create_signal('lava_projects', ['ProjectFormerIdentifier']) + + # Adding model 'Project' + db.create_table('lava_projects_project', ( + ('description', self.gf('django.db.models.fields.TextField')(blank=True)), + ('registered_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='projects', to=orm['auth.User'])), + ('is_aggregate', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), + ('is_public', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'], null=True, blank=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('registered_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('identifier', self.gf('django.db.models.fields.SlugField')(max_length=100, unique=True, db_index=True)), + )) + db.send_create_signal('lava_projects', ['Project']) + + + models = { + + } + + complete_apps = ['lava_projects'] \ No newline at end of file === added file 'lava_projects/migrations/__init__.py' === modified file 'lava_server/extension.py' --- lava_server/extension.py 2012-02-09 02:56:14 +0000 +++ lava_server/extension.py 2013-01-14 21:26:37 +0000 @@ -122,7 +122,7 @@ """ Menu (for navigation) """ - + def __init__(self, label, url, sub_menu=None): self.label = label self.url = url @@ -160,8 +160,8 @@ @property def front_page_template(self): - return None - + return None + def get_front_page_context(self): return {} @@ -171,13 +171,34 @@ def get_menu(self): pass +class DeprecatedExtension(HeadlessExtension): + """ + If an extension ever contributed to schema changes in the DB, then we + can't just delete it alltogher without causing problems with our + south migrations. This is a simple class to keep the extension somewhat + invisible to the UI, but visible to Django for the DB needs. + """ + @abstractproperty + def app_name(self): + """ + Name of this extension's primary django application. + (needed for south migrations) + """ + + def contribute_to_settings(self, settings_module): + settings_module['INSTALLED_APPS'].append(self.app_name) + settings_module['STATICFILES_PREPEND_LABEL_APPS'].append(self.app_name) + + @property + def version(self): + return "deprecated" class Extension(ILavaServerExtension): """ Base class for commmon extensions. This class implements most of the :class:`IExtension` interface leaving a - only handful of more concrete methods and properties to be implemented. + only handful of more concrete methods and properties to be implemented. """ def __init__(self, slug): === modified file 'setup.py' --- setup.py 2013-01-11 17:19:47 +0000 +++ setup.py 2013-01-14 21:26:37 +0000 @@ -33,6 +33,8 @@ lava-server = lava_server.manage:main [lava_server.commands] manage=lava_server.manage:manage + [lava_server.extensions] + project=lava_projects.extension:ProjectExtension """, test_suite="lava_server.tests.run_tests", license="AGPL",