diff --git a/docs/release_notes.rst b/docs/release_notes.rst new file mode 100644 index 000000000..2a32ab0d5 --- /dev/null +++ b/docs/release_notes.rst @@ -0,0 +1,81 @@ +Release notes +============= + +About the versioning +-------------------- + +Up until the django-wiki 0.1 release, versions have been 0.0.1-0.0.24 with +migrations kept in South and without any serious issues of upgrading, +``python manage.py migrate`` was enough. + +*django-wiki 0.1* is cutting ties in the sense that a project's + + +django-wiki 0.0.24 +------------------ + +This release is a transitional release for anyone still using an older version +of django-wiki. The code base has been heavily refactored and this is hopefully +the final release. + +.. warning:: + 0.0.24 is actually mainly a transitional release. + +**Compatibility** + + * Django < 1.7 (That means Django 1.7 is **not** supported) + * South 0.8.4+ (if you are un an older South, you **need** to upgrade) + +django-wiki 0.1 +--------------- + +.. warning:: + If you are upgrading from a previous release, please ensure that you + firstly install django-wiki 0.0.24 because it contains the final migrations + necessary before entering the django-wiki 0.1+ migration tree. + + If you are using django 1.7 and have an old installation of django-wiki + (which should be impossible since it wouldn't run) please downgrade to 1.6, + + :: + + $ pip install django-wiki==0.0.24 + $ python manage.py migrate + $ # EDIT YOUR PROJECT'S SETTINGS + $ pip install django-wiki==0.3 + $ python manage.py migrate + + *Ammending settings*: If you are running django < 1.7, you need the following + in your project's settings: + + :: + + INSTALLED_APPS.append('south') + SOUTH_MIGRATION_MODULES = { + 'django_nyt': 'django_nyt.south_migrations', + 'wiki': 'wiki.south_migrations', + 'images': 'wiki.plugins.images.south_migrations', + 'notifications': 'wiki.plugins.notifications.south_migrations', + 'attachments': 'wiki.plugins.attachments.south_migrations', + } + + + +**Supported** + + * Python 2.7, 3.3, and 3.4 (3.2 is untested) + * Django 1.5, 1.6 and 1.7 + * Django < 1.7 still needs south, and migration trees are kept until next major + release. + +Release plan: + +Until django-wiki 0.2 is released, table names of plugins will defer depending +on whether you are using South or django.db.migrations. If you want to upgrade +your django to 1.7, please rename tables manually. + +Django-wiki 0.2 will *not* support South.. but development will remain in the +0.1 branch for now. + +New features are introduced in the 0.1 branch until something seriously has to +break due to some force majeure. diff --git a/wiki/apps.py b/wiki/apps.py new file mode 100644 index 000000000..26c6ff79e --- /dev/null +++ b/wiki/apps.py @@ -0,0 +1,20 @@ +from django.apps import AppConfig +from django.utils.translation import ugettext_lazy as _ + + +class NotifcationsConfig(AppConfig): + name = 'wiki.plugins.notifications' + verbose_name = _("Wiki notifications") + label = 'wiki_notifications' + + +class ImagesConfig(AppConfig): + name = 'wiki.plugins.images' + verbose_name = _("Wiki images") + label = 'wiki_images' + + +class AttachmentsConfig(AppConfig): + name = 'wiki.plugins.attachments' + verbose_name = _("Wiki attachments") + label = 'wiki_attachments' \ No newline at end of file diff --git a/wiki/plugins/attachments/migrations/0001_initial.py b/wiki/plugins/attachments/south_migrations/0001_initial.py similarity index 100% rename from wiki/plugins/attachments/migrations/0001_initial.py rename to wiki/plugins/attachments/south_migrations/0001_initial.py diff --git a/wiki/migrations/__init__.py b/wiki/plugins/attachments/south_migrations/__init__.py similarity index 100% rename from wiki/migrations/__init__.py rename to wiki/plugins/attachments/south_migrations/__init__.py diff --git a/wiki/plugins/images/migrations/0001_initial.py b/wiki/plugins/images/south_migrations/0001_initial.py similarity index 100% rename from wiki/plugins/images/migrations/0001_initial.py rename to wiki/plugins/images/south_migrations/0001_initial.py diff --git a/wiki/plugins/attachments/migrations/__init__.py b/wiki/plugins/images/south_migrations/__init__.py similarity index 100% rename from wiki/plugins/attachments/migrations/__init__.py rename to wiki/plugins/images/south_migrations/__init__.py diff --git a/wiki/plugins/notifications/migrations/0001_initial.py b/wiki/plugins/notifications/south_migrations/0001_initial.py similarity index 100% rename from wiki/plugins/notifications/migrations/0001_initial.py rename to wiki/plugins/notifications/south_migrations/0001_initial.py diff --git a/wiki/plugins/notifications/south_migrations/0002_auto__add_field_articlesubscription_subscription__chg_field_articlesub.py b/wiki/plugins/notifications/south_migrations/0002_auto__add_field_articlesubscription_subscription__chg_field_articlesub.py new file mode 100644 index 000000000..6a67afe70 --- /dev/null +++ b/wiki/plugins/notifications/south_migrations/0002_auto__add_field_articlesubscription_subscription__chg_field_articlesub.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'ArticleSubscription.subscription' + db.add_column(u'notifications_articlesubscription', 'subscription', + self.gf('django.db.models.fields.related.OneToOneField')(to=orm['django_nyt.Subscription'], unique=True, null=True), + keep_default=False) + + + # Changing field 'ArticleSubscription.subscription_ptr' + db.alter_column(u'notifications_articlesubscription', 'subscription_ptr_id', self.gf('django.db.models.fields.related.OneToOneField')(unique=True, to=orm['django_nyt.Subscription'])) + + def backwards(self, orm): + # Deleting field 'ArticleSubscription.subscription' + db.delete_column(u'notifications_articlesubscription', 'subscription_id') + + + # Changing field 'ArticleSubscription.subscription_ptr' + db.alter_column(u'notifications_articlesubscription', 'subscription_ptr_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['django_notify.Subscription'], unique=True)) + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'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': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'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'}), + u'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'}) + }, + u'django_nyt.notification': { + 'Meta': {'ordering': "('-id',)", 'object_name': 'Notification', 'db_table': "'nyt_notification'"}, + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_emailed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_viewed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'message': ('django.db.models.fields.TextField', [], {}), + 'occurrences': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'subscription': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['django_nyt.Subscription']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'url': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) + }, + u'django_nyt.notificationtype': { + 'Meta': {'object_name': 'NotificationType', 'db_table': "'nyt_notificationtype'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), + 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) + }, + u'django_nyt.settings': { + 'Meta': {'object_name': 'Settings', 'db_table': "'nyt_settings'"}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'interval': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + u'django_nyt.subscription': { + 'Meta': {'object_name': 'Subscription', 'db_table': "'nyt_subscription'"}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'latest': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'latest_for'", 'null': 'True', 'to': u"orm['django_nyt.Notification']"}), + 'notification_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['django_nyt.NotificationType']"}), + 'object_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), + 'send_emails': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'settings': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['django_nyt.Settings']"}) + }, + 'notifications.articlesubscription': { + 'Meta': {'object_name': 'ArticleSubscription', '_ormbases': ['wiki.ArticlePlugin']}, + u'articleplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['wiki.ArticlePlugin']", 'unique': 'True', 'primary_key': 'True'}), + 'subscription': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['django_nyt.Subscription']", 'unique': 'True', 'null': 'True'}), + 'subscription_ptr': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "u'deprecated_subscriptions'", 'unique': 'True', 'to': u"orm['django_nyt.Subscription']"}) + }, + 'wiki.article': { + 'Meta': {'object_name': 'Article'}, + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'current_revision': ('django.db.models.fields.related.OneToOneField', [], {'blank': 'True', 'related_name': "u'current_set'", 'unique': 'True', 'null': 'True', 'to': "orm['wiki.ArticleRevision']"}), + 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.Group']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'group_read': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'group_write': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'other_read': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'other_write': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_articles'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['auth.User']"}) + }, + 'wiki.articleplugin': { + 'Meta': {'object_name': 'ArticlePlugin'}, + 'article': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wiki.Article']"}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'wiki.articlerevision': { + 'Meta': {'ordering': "(u'created',)", 'unique_together': "((u'article', u'revision_number'),)", 'object_name': 'ArticleRevision'}, + 'article': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wiki.Article']"}), + 'automatic_log': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'content': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'previous_revision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wiki.ArticleRevision']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'revision_number': ('django.db.models.fields.IntegerField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '512'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'user_message': ('django.db.models.fields.TextField', [], {'blank': 'True'}) + } + } + + complete_apps = ['notifications'] \ No newline at end of file diff --git a/wiki/plugins/notifications/migrations/0002_auto__del_articlesubscription.py b/wiki/plugins/notifications/south_migrations/0002_auto__del_articlesubscription.py similarity index 100% rename from wiki/plugins/notifications/migrations/0002_auto__del_articlesubscription.py rename to wiki/plugins/notifications/south_migrations/0002_auto__del_articlesubscription.py diff --git a/wiki/plugins/images/migrations/__init__.py b/wiki/plugins/notifications/south_migrations/__init__.py similarity index 100% rename from wiki/plugins/images/migrations/__init__.py rename to wiki/plugins/notifications/south_migrations/__init__.py diff --git a/wiki/migrations/0001_initial.py b/wiki/south_migrations/0001_initial.py similarity index 100% rename from wiki/migrations/0001_initial.py rename to wiki/south_migrations/0001_initial.py diff --git a/wiki/migrations/0002_auto__add_field_articleplugin_created.py b/wiki/south_migrations/0002_auto__add_field_articleplugin_created.py similarity index 100% rename from wiki/migrations/0002_auto__add_field_articleplugin_created.py rename to wiki/south_migrations/0002_auto__add_field_articleplugin_created.py diff --git a/wiki/migrations/0003_auto__add_field_urlpath_article.py b/wiki/south_migrations/0003_auto__add_field_urlpath_article.py similarity index 100% rename from wiki/migrations/0003_auto__add_field_urlpath_article.py rename to wiki/south_migrations/0003_auto__add_field_urlpath_article.py diff --git a/wiki/migrations/0004_populate_urlpath__article.py b/wiki/south_migrations/0004_populate_urlpath__article.py similarity index 100% rename from wiki/migrations/0004_populate_urlpath__article.py rename to wiki/south_migrations/0004_populate_urlpath__article.py diff --git a/wiki/migrations/0005_auto__chg_field_urlpath_article.py b/wiki/south_migrations/0005_auto__chg_field_urlpath_article.py similarity index 100% rename from wiki/migrations/0005_auto__chg_field_urlpath_article.py rename to wiki/south_migrations/0005_auto__chg_field_urlpath_article.py diff --git a/wiki/migrations/0006_auto__add_attachmentrevision__add_image__add_attachment.py b/wiki/south_migrations/0006_auto__add_attachmentrevision__add_image__add_attachment.py similarity index 100% rename from wiki/migrations/0006_auto__add_attachmentrevision__add_image__add_attachment.py rename to wiki/south_migrations/0006_auto__add_attachmentrevision__add_image__add_attachment.py diff --git a/wiki/migrations/0007_auto__add_articlesubscription.py b/wiki/south_migrations/0007_auto__add_articlesubscription.py similarity index 100% rename from wiki/migrations/0007_auto__add_articlesubscription.py rename to wiki/south_migrations/0007_auto__add_articlesubscription.py diff --git a/wiki/migrations/0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_.py b/wiki/south_migrations/0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_.py similarity index 100% rename from wiki/migrations/0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_.py rename to wiki/south_migrations/0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_.py diff --git a/wiki/migrations/0009_auto__add_field_imagerevision_width__add_field_imagerevision_height.py b/wiki/south_migrations/0009_auto__add_field_imagerevision_width__add_field_imagerevision_height.py similarity index 100% rename from wiki/migrations/0009_auto__add_field_imagerevision_width__add_field_imagerevision_height.py rename to wiki/south_migrations/0009_auto__add_field_imagerevision_width__add_field_imagerevision_height.py diff --git a/wiki/migrations/0010_auto__chg_field_imagerevision_image.py b/wiki/south_migrations/0010_auto__chg_field_imagerevision_image.py similarity index 100% rename from wiki/migrations/0010_auto__chg_field_imagerevision_image.py rename to wiki/south_migrations/0010_auto__chg_field_imagerevision_image.py diff --git a/wiki/migrations/0011_auto__chg_field_imagerevision_width__chg_field_imagerevision_height.py b/wiki/south_migrations/0011_auto__chg_field_imagerevision_width__chg_field_imagerevision_height.py similarity index 100% rename from wiki/migrations/0011_auto__chg_field_imagerevision_width__chg_field_imagerevision_height.py rename to wiki/south_migrations/0011_auto__chg_field_imagerevision_width__chg_field_imagerevision_height.py diff --git a/wiki/migrations/0012_auto__chg_field_attachmentrevision_user__chg_field_attachmentrevision_.py b/wiki/south_migrations/0012_auto__chg_field_attachmentrevision_user__chg_field_attachmentrevision_.py similarity index 100% rename from wiki/migrations/0012_auto__chg_field_attachmentrevision_user__chg_field_attachmentrevision_.py rename to wiki/south_migrations/0012_auto__chg_field_attachmentrevision_user__chg_field_attachmentrevision_.py diff --git a/wiki/migrations/0013_auto__chg_field_attachmentrevision_previous_revision__chg_field_revisi.py b/wiki/south_migrations/0013_auto__chg_field_attachmentrevision_previous_revision__chg_field_revisi.py similarity index 100% rename from wiki/migrations/0013_auto__chg_field_attachmentrevision_previous_revision__chg_field_revisi.py rename to wiki/south_migrations/0013_auto__chg_field_attachmentrevision_previous_revision__chg_field_revisi.py diff --git a/wiki/plugins/notifications/migrations/__init__.py b/wiki/south_migrations/__init__.py similarity index 100% rename from wiki/plugins/notifications/migrations/__init__.py rename to wiki/south_migrations/__init__.py