forked from django-wiki/django-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor old South migration modules "migrations"->"south_migrations"…
…, add AppConfigs for future Django 1.7 (not supported yet), initial release notes, delete odd notifications migration that by mistake deletes the notifications subscriptions tables!
- Loading branch information
1 parent
102b015
commit ddf6aa3
Showing
24 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
142 changes: 142 additions & 0 deletions
142
...migrations/0002_auto__add_field_articlesubscription_subscription__chg_field_articlesub.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.