From fbfb6da975bac5b439e1c472732c3059d1db8e18 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 25 Mar 2019 21:45:34 +0100 Subject: [PATCH] Resolve support for Django 2.0 --- bin/player-account-step1.patch | 8 +++--- evennia/accounts/migrations/0001_initial.py | 18 ++++++------ .../migrations/0004_auto_20150403_2339.py | 2 +- .../migrations/0006_auto_20170606_1731.py | 4 +-- evennia/accounts/tests.py | 3 +- evennia/comms/migrations/0001_initial.py | 20 ++++++------- .../0002_msg_db_hide_from_objects.py | 2 +- .../migrations/0003_auto_20140917_0756.py | 18 ++++++------ .../0006_channeldb_db_object_subscriptions.py | 2 +- evennia/comms/migrations/0007_msg_db_tags.py | 2 +- .../migrations/0009_auto_20160921_1731.py | 14 +++++----- .../migrations/0010_auto_20161206_1912.py | 4 +-- .../migrations/0011_auto_20170217_2039.py | 4 +-- .../migrations/0011_auto_20170606_1731.py | 20 ++++++------- .../migrations/0013_auto_20170705_1726.py | 20 ++++++------- .../migrations/0016_auto_20180925_1735.py | 2 +- evennia/help/migrations/0001_initial.py | 10 +++---- .../migrations/0002_auto_20170606_1731.py | 2 +- evennia/objects/migrations/0001_initial.py | 20 ++++++------- .../migrations/0002_auto_20140917_0756.py | 4 +-- .../migrations/0006_auto_20170606_1731.py | 6 ++-- .../migrations/0007_objectdb_db_account.py | 2 +- evennia/scripts/migrations/0001_initial.py | 28 +++++++++---------- .../migrations/0008_auto_20170606_1731.py | 4 +-- .../migrations/0009_scriptdb_db_account.py | 2 +- .../typeclasses/migrations/0001_initial.py | 26 ++++++++--------- .../migrations/0002_auto_20150109_0913.py | 2 +- ...ltplayer_defaultroom_defaultscript_dono.py | 4 +-- .../migrations/0004_auto_20151101_1759.py | 2 +- evennia/web/utils/general_context.py | 2 +- evennia/web/utils/middleware.py | 4 +-- requirements.txt | 2 +- 32 files changed, 132 insertions(+), 131 deletions(-) diff --git a/bin/player-account-step1.patch b/bin/player-account-step1.patch index c13e8e9d25..ede1d2e9b5 100644 --- a/bin/player-account-step1.patch +++ b/bin/player-account-step1.patch @@ -83,7 +83,7 @@ index b27c75c..6e40252 100644 - migrations.AddField( - model_name='objectdb', - name='db_account', -- field=models.ForeignKey(help_text=b'an Account connected to this object, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.AccountDB', verbose_name=b'account'), +- field=models.ForeignKey(help_text='an Account connected to this object, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.AccountDB', verbose_name='account'), - ), - ] + db_cursor = connection.cursor() @@ -95,7 +95,7 @@ index b27c75c..6e40252 100644 + migrations.AddField( + model_name='objectdb', + name='db_account', -+ field=models.ForeignKey(help_text=b'an Account connected to this object, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.AccountDB', verbose_name=b'account'), ++ field=models.ForeignKey(help_text='an Account connected to this object, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.AccountDB', verbose_name='account'), + ), + ] diff --git a/evennia/objects/migrations/0009_remove_objectdb_db_player.py b/evennia/objects/migrations/0009_remove_objectdb_db_player.py @@ -167,7 +167,7 @@ index 99baf70..23f6df9 100644 - migrations.AddField( - model_name='scriptdb', - name='db_account', -- field=models.ForeignKey(blank=True, help_text=b'the account to store this script on (should not be set if db_obj is set)', null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.AccountDB', verbose_name=b'scripted account'), +- field=models.ForeignKey(blank=True, help_text='the account to store this script on (should not be set if db_obj is set)', null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.AccountDB', verbose_name='scripted account'), - ), - ] + db_cursor = connection.cursor() @@ -179,7 +179,7 @@ index 99baf70..23f6df9 100644 + migrations.AddField( + model_name='scriptdb', + name='db_account', -+ field=models.ForeignKey(blank=True, help_text=b'the account to store this script on (should not be set if db_obj is set)', null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.AccountDB', verbose_name=b'scripted account'), ++ field=models.ForeignKey(blank=True, help_text='the account to store this script on (should not be set if db_obj is set)', null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.AccountDB', verbose_name='scripted account'), + ), + ] diff --git a/evennia/scripts/migrations/0011_remove_scriptdb_db_player.py b/evennia/scripts/migrations/0011_remove_scriptdb_db_player.py diff --git a/evennia/accounts/migrations/0001_initial.py b/evennia/accounts/migrations/0001_initial.py index 787eaa79cb..9e7386c88c 100644 --- a/evennia/accounts/migrations/0001_initial.py +++ b/evennia/accounts/migrations/0001_initial.py @@ -28,15 +28,15 @@ class Migration(migrations.Migration): ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), - ('db_key', models.CharField(max_length=255, verbose_name=b'key', db_index=True)), - ('db_typeclass_path', models.CharField(help_text=b"this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name=b'typeclass')), - ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), - ('db_lock_storage', models.TextField(help_text=b"locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name=b'locks', blank=True)), - ('db_is_connected', models.BooleanField(default=False, help_text=b'If account is connected to game or not', verbose_name=b'is_connected')), - ('db_cmdset_storage', models.CharField(help_text=b'optional python path to a cmdset class. If creating a Character, this will default to settings.CMDSET_CHARACTER.', max_length=255, null=True, verbose_name=b'cmdset')), - ('db_is_bot', models.BooleanField(default=False, help_text=b'Used to identify irc/rss bots', verbose_name=b'is_bot')), - ('db_attributes', models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True)), - ('db_tags', models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True)), + ('db_key', models.CharField(max_length=255, verbose_name='key', db_index=True)), + ('db_typeclass_path', models.CharField(help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass')), + ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name='creation date')), + ('db_lock_storage', models.TextField(help_text="locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name='locks', blank=True)), + ('db_is_connected', models.BooleanField(default=False, help_text='If account is connected to game or not', verbose_name='is_connected')), + ('db_cmdset_storage', models.CharField(help_text='optional python path to a cmdset class. If creating a Character, this will default to settings.CMDSET_CHARACTER.', max_length=255, null=True, verbose_name='cmdset')), + ('db_is_bot', models.BooleanField(default=False, help_text='Used to identify irc/rss bots', verbose_name='is_bot')), + ('db_attributes', models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True)), + ('db_tags', models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True)), ('groups', models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Group', blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of his/her group.', verbose_name='groups')), ('user_permissions', models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Permission', blank=True, help_text='Specific permissions for this user.', verbose_name='user permissions')), ], diff --git a/evennia/accounts/migrations/0004_auto_20150403_2339.py b/evennia/accounts/migrations/0004_auto_20150403_2339.py index b1412ae9a8..2ce75241cf 100644 --- a/evennia/accounts/migrations/0004_auto_20150403_2339.py +++ b/evennia/accounts/migrations/0004_auto_20150403_2339.py @@ -22,7 +22,7 @@ class Migration(migrations.Migration): migrations.AlterModelManagers( name='accountdb', managers=[ - (b'objects', evennia.accounts.manager.AccountDBManager()), + ('objects', evennia.accounts.manager.AccountDBManager()), ], ), migrations.AlterField( diff --git a/evennia/accounts/migrations/0006_auto_20170606_1731.py b/evennia/accounts/migrations/0006_auto_20170606_1731.py index c149d8b113..50e084d242 100644 --- a/evennia/accounts/migrations/0006_auto_20170606_1731.py +++ b/evennia/accounts/migrations/0006_auto_20170606_1731.py @@ -16,12 +16,12 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='accountdb', name='db_attributes', - field=models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), + field=models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), ), migrations.AlterField( model_name='accountdb', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), + field=models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), ), migrations.AlterField( model_name='accountdb', diff --git a/evennia/accounts/tests.py b/evennia/accounts/tests.py index 37d525ff6b..67cca23246 100644 --- a/evennia/accounts/tests.py +++ b/evennia/accounts/tests.py @@ -188,7 +188,8 @@ class TestDefaultAccountAuth(EvenniaTest): from django.core.exceptions import ValidationError # Try setting some bad passwords for bad in ('', '#', 'TestAccount', 'password'): - self.assertRaises(ValidationError, account.set_password, bad) + valid, error = account.validate_password(bad, account) + self.assertFalse(valid) # Try setting a better password (test for False; returns None on success) self.assertFalse(account.set_password('Mxyzptlk')) diff --git a/evennia/comms/migrations/0001_initial.py b/evennia/comms/migrations/0001_initial.py index 4e502e3145..ba09b62bb9 100644 --- a/evennia/comms/migrations/0001_initial.py +++ b/evennia/comms/migrations/0001_initial.py @@ -14,10 +14,10 @@ class Migration(migrations.Migration): name='ChannelDB', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_key', models.CharField(max_length=255, verbose_name=b'key', db_index=True)), - ('db_typeclass_path', models.CharField(help_text=b"this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name=b'typeclass')), - ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), - ('db_lock_storage', models.TextField(help_text=b"locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name=b'locks', blank=True)), + ('db_key', models.CharField(max_length=255, verbose_name='key', db_index=True)), + ('db_typeclass_path', models.CharField(help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass')), + ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name='creation date')), + ('db_lock_storage', models.TextField(help_text="locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name='locks', blank=True)), ], options={ 'verbose_name': 'Channel', @@ -29,12 +29,12 @@ class Migration(migrations.Migration): name='Msg', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_sender_external', models.CharField(help_text=b"identifier for external sender, for example a sender over an IRC connection (i.e. someone who doesn't have an exixtence in-game).", max_length=255, null=True, verbose_name=b'external sender', db_index=True)), - ('db_header', models.TextField(null=True, verbose_name=b'header', blank=True)), - ('db_message', models.TextField(verbose_name=b'messsage')), - ('db_date_sent', models.DateTimeField(auto_now_add=True, verbose_name=b'date sent', db_index=True)), - ('db_lock_storage', models.TextField(help_text=b'access locks on this message.', verbose_name=b'locks', blank=True)), - ('db_hide_from_channels', models.ManyToManyField(related_name=b'hide_from_channels_set', null=True, to='comms.ChannelDB')), + ('db_sender_external', models.CharField(help_text="identifier for external sender, for example a sender over an IRC connection (i.e. someone who doesn't have an exixtence in-game).", max_length=255, null=True, verbose_name='external sender', db_index=True)), + ('db_header', models.TextField(null=True, verbose_name='header', blank=True)), + ('db_message', models.TextField(verbose_name='messsage')), + ('db_date_sent', models.DateTimeField(auto_now_add=True, verbose_name='date sent', db_index=True)), + ('db_lock_storage', models.TextField(help_text='access locks on this message.', verbose_name='locks', blank=True)), + ('db_hide_from_channels', models.ManyToManyField(related_name='hide_from_channels_set', null=True, to='comms.ChannelDB')), ], options={ 'verbose_name': 'Message', diff --git a/evennia/comms/migrations/0002_msg_db_hide_from_objects.py b/evennia/comms/migrations/0002_msg_db_hide_from_objects.py index 20e6c1a126..09f8ceb118 100644 --- a/evennia/comms/migrations/0002_msg_db_hide_from_objects.py +++ b/evennia/comms/migrations/0002_msg_db_hide_from_objects.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='msg', name='db_hide_from_objects', - field=models.ManyToManyField(related_name=b'hide_from_objects_set', null=True, to='objects.ObjectDB'), + field=models.ManyToManyField(related_name='hide_from_objects_set', null=True, to='objects.ObjectDB'), preserve_default=True, ), ] diff --git a/evennia/comms/migrations/0003_auto_20140917_0756.py b/evennia/comms/migrations/0003_auto_20140917_0756.py index 5f7be96f8f..c9b4a32d64 100644 --- a/evennia/comms/migrations/0003_auto_20140917_0756.py +++ b/evennia/comms/migrations/0003_auto_20140917_0756.py @@ -18,55 +18,55 @@ class Migration(migrations.Migration): migrations.AddField( model_name='msg', name='db_hide_from_accounts', - field=models.ManyToManyField(related_name=b'hide_from_accounts_set', null=True, to=settings.AUTH_USER_MODEL), + field=models.ManyToManyField(related_name='hide_from_accounts_set', null=True, to=settings.AUTH_USER_MODEL), preserve_default=True, ), migrations.AddField( model_name='msg', name='db_receivers_channels', - field=models.ManyToManyField(help_text=b'channel recievers', related_name=b'channel_set', null=True, to='comms.ChannelDB'), + field=models.ManyToManyField(help_text='channel recievers', related_name='channel_set', null=True, to='comms.ChannelDB'), preserve_default=True, ), migrations.AddField( model_name='msg', name='db_receivers_objects', - field=models.ManyToManyField(help_text=b'object receivers', related_name=b'receiver_object_set', null=True, to='objects.ObjectDB'), + field=models.ManyToManyField(help_text='object receivers', related_name='receiver_object_set', null=True, to='objects.ObjectDB'), preserve_default=True, ), migrations.AddField( model_name='msg', name='db_receivers_accounts', - field=models.ManyToManyField(help_text=b'account receivers', related_name=b'receiver_account_set', null=True, to=settings.AUTH_USER_MODEL), + field=models.ManyToManyField(help_text='account receivers', related_name='receiver_account_set', null=True, to=settings.AUTH_USER_MODEL), preserve_default=True, ), migrations.AddField( model_name='msg', name='db_sender_objects', - field=models.ManyToManyField(related_name=b'sender_object_set', null=True, verbose_name=b'sender(object)', to='objects.ObjectDB', db_index=True), + field=models.ManyToManyField(related_name='sender_object_set', null=True, verbose_name='sender(object)', to='objects.ObjectDB', db_index=True), preserve_default=True, ), migrations.AddField( model_name='msg', name='db_sender_accounts', - field=models.ManyToManyField(related_name=b'sender_account_set', null=True, verbose_name=b'sender(account)', to=settings.AUTH_USER_MODEL, db_index=True), + field=models.ManyToManyField(related_name='sender_account_set', null=True, verbose_name='sender(account)', to=settings.AUTH_USER_MODEL, db_index=True), preserve_default=True, ), migrations.AddField( model_name='channeldb', name='db_attributes', - field=models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True), + field=models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True), preserve_default=True, ), migrations.AddField( model_name='channeldb', name='db_subscriptions', - field=models.ManyToManyField(related_name=b'subscription_set', null=True, verbose_name=b'subscriptions', to=settings.AUTH_USER_MODEL, db_index=True), + field=models.ManyToManyField(related_name='subscription_set', null=True, verbose_name='subscriptions', to=settings.AUTH_USER_MODEL, db_index=True), preserve_default=True, ), migrations.AddField( model_name='channeldb', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True), + field=models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True), preserve_default=True, ), ] diff --git a/evennia/comms/migrations/0006_channeldb_db_object_subscriptions.py b/evennia/comms/migrations/0006_channeldb_db_object_subscriptions.py index 568da97c7c..10aa762576 100644 --- a/evennia/comms/migrations/0006_channeldb_db_object_subscriptions.py +++ b/evennia/comms/migrations/0006_channeldb_db_object_subscriptions.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='channeldb', name='db_object_subscriptions', - field=models.ManyToManyField(related_name='object_subscription_set', null=True, verbose_name=b'subscriptions', to='objects.ObjectDB', db_index=True), + field=models.ManyToManyField(related_name='object_subscription_set', null=True, verbose_name='subscriptions', to='objects.ObjectDB', db_index=True), preserve_default=True, ), ] diff --git a/evennia/comms/migrations/0007_msg_db_tags.py b/evennia/comms/migrations/0007_msg_db_tags.py index e54a058a2b..570a84e57c 100644 --- a/evennia/comms/migrations/0007_msg_db_tags.py +++ b/evennia/comms/migrations/0007_msg_db_tags.py @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='msg', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this message. Tags are simple string markers to identify, group and alias messages.', to='typeclasses.Tag', null=True), + field=models.ManyToManyField(help_text='tags on this message. Tags are simple string markers to identify, group and alias messages.', to='typeclasses.Tag', null=True), ), ] diff --git a/evennia/comms/migrations/0009_auto_20160921_1731.py b/evennia/comms/migrations/0009_auto_20160921_1731.py index f803704d3f..d9a589f836 100644 --- a/evennia/comms/migrations/0009_auto_20160921_1731.py +++ b/evennia/comms/migrations/0009_auto_20160921_1731.py @@ -31,36 +31,36 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='msg', name='db_receivers_channels', - field=models.ManyToManyField(blank=True, help_text=b'channel recievers', null=True, related_name='channel_set', to='comms.ChannelDB'), + field=models.ManyToManyField(blank=True, help_text='channel recievers', null=True, related_name='channel_set', to='comms.ChannelDB'), ), migrations.AlterField( model_name='msg', name='db_receivers_objects', - field=models.ManyToManyField(blank=True, help_text=b'object receivers', null=True, related_name='receiver_object_set', to='objects.ObjectDB'), + field=models.ManyToManyField(blank=True, help_text='object receivers', null=True, related_name='receiver_object_set', to='objects.ObjectDB'), ), migrations.AlterField( model_name='msg', name='db_receivers_accounts', - field=models.ManyToManyField(blank=True, help_text=b'account receivers', null=True, related_name='receiver_account_set', to=settings.AUTH_USER_MODEL), + field=models.ManyToManyField(blank=True, help_text='account receivers', null=True, related_name='receiver_account_set', to=settings.AUTH_USER_MODEL), ), migrations.AlterField( model_name='msg', name='db_sender_external', - field=models.CharField(blank=True, db_index=True, help_text=b"identifier for external sender, for example a sender over an IRC connection (i.e. someone who doesn't have an exixtence in-game).", max_length=255, null=True, verbose_name=b'external sender'), + field=models.CharField(blank=True, db_index=True, help_text="identifier for external sender, for example a sender over an IRC connection (i.e. someone who doesn't have an exixtence in-game).", max_length=255, null=True, verbose_name='external sender'), ), migrations.AlterField( model_name='msg', name='db_sender_objects', - field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='sender_object_set', to='objects.ObjectDB', verbose_name=b'sender(object)'), + field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='sender_object_set', to='objects.ObjectDB', verbose_name='sender(object)'), ), migrations.AlterField( model_name='msg', name='db_sender_accounts', - field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='sender_account_set', to=settings.AUTH_USER_MODEL, verbose_name=b'sender(account)'), + field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='sender_account_set', to=settings.AUTH_USER_MODEL, verbose_name='sender(account)'), ), migrations.AlterField( model_name='msg', name='db_tags', - field=models.ManyToManyField(blank=True, help_text=b'tags on this message. Tags are simple string markers to identify, group and alias messages.', null=True, to='typeclasses.Tag'), + field=models.ManyToManyField(blank=True, help_text='tags on this message. Tags are simple string markers to identify, group and alias messages.', null=True, to='typeclasses.Tag'), ), ] diff --git a/evennia/comms/migrations/0010_auto_20161206_1912.py b/evennia/comms/migrations/0010_auto_20161206_1912.py index b3a10ebe98..dfb333f4ae 100644 --- a/evennia/comms/migrations/0010_auto_20161206_1912.py +++ b/evennia/comms/migrations/0010_auto_20161206_1912.py @@ -16,11 +16,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='channeldb', name='db_object_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name=b'subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name='subscriptions'), ), migrations.AlterField( model_name='channeldb', name='db_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='subscription_set', to=settings.AUTH_USER_MODEL, verbose_name=b'subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='subscription_set', to=settings.AUTH_USER_MODEL, verbose_name='subscriptions'), ), ] diff --git a/evennia/comms/migrations/0011_auto_20170217_2039.py b/evennia/comms/migrations/0011_auto_20170217_2039.py index 13578b031a..2cdcf09b0a 100644 --- a/evennia/comms/migrations/0011_auto_20170217_2039.py +++ b/evennia/comms/migrations/0011_auto_20170217_2039.py @@ -16,11 +16,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='msg', name='db_receivers_scripts', - field=models.ManyToManyField(blank=True, help_text=b'script_receivers', null=True, related_name='receiver_script_set', to='scripts.ScriptDB'), + field=models.ManyToManyField(blank=True, help_text='script_receivers', null=True, related_name='receiver_script_set', to='scripts.ScriptDB'), ), migrations.AddField( model_name='msg', name='db_sender_scripts', - field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='sender_script_set', to='scripts.ScriptDB', verbose_name=b'sender(script)'), + field=models.ManyToManyField(blank=True, db_index=True, null=True, related_name='sender_script_set', to='scripts.ScriptDB', verbose_name='sender(script)'), ), ] diff --git a/evennia/comms/migrations/0011_auto_20170606_1731.py b/evennia/comms/migrations/0011_auto_20170606_1731.py index 128e22bd01..f25397b248 100644 --- a/evennia/comms/migrations/0011_auto_20170606_1731.py +++ b/evennia/comms/migrations/0011_auto_20170606_1731.py @@ -16,22 +16,22 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='channeldb', name='db_attributes', - field=models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), + field=models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), ), migrations.AlterField( model_name='channeldb', name='db_object_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name=b'subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name='subscriptions'), ), migrations.AlterField( model_name='channeldb', name='db_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, related_name='subscription_set', to=settings.AUTH_USER_MODEL, verbose_name=b'subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='subscription_set', to=settings.AUTH_USER_MODEL, verbose_name='subscriptions'), ), migrations.AlterField( model_name='channeldb', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), + field=models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), ), migrations.AlterField( model_name='msg', @@ -51,31 +51,31 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='msg', name='db_receivers_channels', - field=models.ManyToManyField(blank=True, help_text=b'channel recievers', related_name='channel_set', to='comms.ChannelDB'), + field=models.ManyToManyField(blank=True, help_text='channel recievers', related_name='channel_set', to='comms.ChannelDB'), ), migrations.AlterField( model_name='msg', name='db_receivers_objects', - field=models.ManyToManyField(blank=True, help_text=b'object receivers', related_name='receiver_object_set', to='objects.ObjectDB'), + field=models.ManyToManyField(blank=True, help_text='object receivers', related_name='receiver_object_set', to='objects.ObjectDB'), ), migrations.AlterField( model_name='msg', name='db_receivers_accounts', - field=models.ManyToManyField(blank=True, help_text=b'account receivers', related_name='receiver_account_set', to=settings.AUTH_USER_MODEL), + field=models.ManyToManyField(blank=True, help_text='account receivers', related_name='receiver_account_set', to=settings.AUTH_USER_MODEL), ), migrations.AlterField( model_name='msg', name='db_sender_objects', - field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_object_set', to='objects.ObjectDB', verbose_name=b'sender(object)'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_object_set', to='objects.ObjectDB', verbose_name='sender(object)'), ), migrations.AlterField( model_name='msg', name='db_sender_accounts', - field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_account_set', to=settings.AUTH_USER_MODEL, verbose_name=b'sender(account)'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_account_set', to=settings.AUTH_USER_MODEL, verbose_name='sender(account)'), ), migrations.AlterField( model_name='msg', name='db_tags', - field=models.ManyToManyField(blank=True, help_text=b'tags on this message. Tags are simple string markers to identify, group and alias messages.', to='typeclasses.Tag'), + field=models.ManyToManyField(blank=True, help_text='tags on this message. Tags are simple string markers to identify, group and alias messages.', to='typeclasses.Tag'), ), ] diff --git a/evennia/comms/migrations/0013_auto_20170705_1726.py b/evennia/comms/migrations/0013_auto_20170705_1726.py index b8a863fcb9..aff480a7f0 100644 --- a/evennia/comms/migrations/0013_auto_20170705_1726.py +++ b/evennia/comms/migrations/0013_auto_20170705_1726.py @@ -23,37 +23,37 @@ class Migration(migrations.Migration): migrations.AddField( model_name='channeldb', name='db_account_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, related_name='account_subscription_set', to='accounts.AccountDB', verbose_name=b'account subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='account_subscription_set', to='accounts.AccountDB', verbose_name='account subscriptions'), ), migrations.AlterField( model_name='channeldb', name='db_object_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name=b'object subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name='object subscriptions'), ), migrations.AlterField( model_name='msg', name='db_receivers_scripts', - field=models.ManyToManyField(blank=True, help_text=b'script_receivers', related_name='receiver_script_set', to='scripts.ScriptDB'), + field=models.ManyToManyField(blank=True, help_text='script_receivers', related_name='receiver_script_set', to='scripts.ScriptDB'), ), migrations.AlterField( model_name='msg', name='db_sender_scripts', - field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_script_set', to='scripts.ScriptDB', verbose_name=b'sender(script)'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_script_set', to='scripts.ScriptDB', verbose_name='sender(script)'), ), migrations.AlterField( model_name='channeldb', name='db_object_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name=b'object subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='object_subscription_set', to='objects.ObjectDB', verbose_name='object subscriptions'), ), migrations.AlterField( model_name='msg', name='db_receivers_scripts', - field=models.ManyToManyField(blank=True, help_text=b'script_receivers', related_name='receiver_script_set', to='scripts.ScriptDB'), + field=models.ManyToManyField(blank=True, help_text='script_receivers', related_name='receiver_script_set', to='scripts.ScriptDB'), ), migrations.AlterField( model_name='msg', name='db_sender_scripts', - field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_script_set', to='scripts.ScriptDB', verbose_name=b'sender(script)'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_script_set', to='scripts.ScriptDB', verbose_name='sender(script)'), ), ] @@ -64,7 +64,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='channeldb', name='db_account_subscriptions', - field=models.ManyToManyField(blank=True, db_index=True, related_name='account_subscription_set', to='accounts.AccountDB', verbose_name=b'account subscriptions'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='account_subscription_set', to='accounts.AccountDB', verbose_name='account subscriptions'), ), migrations.AddField( model_name='msg', @@ -74,11 +74,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='msg', name='db_receivers_accounts', - field=models.ManyToManyField(blank=True, help_text=b'account receivers', related_name='receiver_account_set', to='accounts.AccountDB'), + field=models.ManyToManyField(blank=True, help_text='account receivers', related_name='receiver_account_set', to='accounts.AccountDB'), ), migrations.AddField( model_name='msg', name='db_sender_accounts', - field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_account_set', to='accounts.AccountDB', verbose_name=b'sender(account)'), + field=models.ManyToManyField(blank=True, db_index=True, related_name='sender_account_set', to='accounts.AccountDB', verbose_name='sender(account)'), ), ] diff --git a/evennia/comms/migrations/0016_auto_20180925_1735.py b/evennia/comms/migrations/0016_auto_20180925_1735.py index 5158e1f61d..abe19c691a 100644 --- a/evennia/comms/migrations/0016_auto_20180925_1735.py +++ b/evennia/comms/migrations/0016_auto_20180925_1735.py @@ -19,6 +19,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='msg', name='db_message', - field=models.TextField(verbose_name=b'message'), + field=models.TextField(verbose_name='message'), ), ] diff --git a/evennia/help/migrations/0001_initial.py b/evennia/help/migrations/0001_initial.py index 6bc0be6b97..ba4811a6a7 100644 --- a/evennia/help/migrations/0001_initial.py +++ b/evennia/help/migrations/0001_initial.py @@ -15,12 +15,12 @@ class Migration(migrations.Migration): name='HelpEntry', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_key', models.CharField(help_text=b'key to search for', unique=True, max_length=255, verbose_name=b'help key')), - ('db_help_category', models.CharField(default=b'General', help_text=b'organizes help entries in lists', max_length=255, verbose_name=b'help category')), - ('db_entrytext', models.TextField(help_text=b'the main body of help text', verbose_name=b'help entry', blank=True)), - ('db_lock_storage', models.TextField(help_text=b'normally view:all().', verbose_name=b'locks', blank=True)), + ('db_key', models.CharField(help_text='key to search for', unique=True, max_length=255, verbose_name='help key')), + ('db_help_category', models.CharField(default='General', help_text='organizes help entries in lists', max_length=255, verbose_name='help category')), + ('db_entrytext', models.TextField(help_text='the main body of help text', verbose_name='help entry', blank=True)), + ('db_lock_storage', models.TextField(help_text='normally view:all().', verbose_name='locks', blank=True)), ('db_staff_only', models.BooleanField(default=False)), - ('db_tags', models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True)), + ('db_tags', models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True)), ], options={ 'verbose_name': 'Help Entry', diff --git a/evennia/help/migrations/0002_auto_20170606_1731.py b/evennia/help/migrations/0002_auto_20170606_1731.py index 10f939c18d..82cdc7788a 100644 --- a/evennia/help/migrations/0002_auto_20170606_1731.py +++ b/evennia/help/migrations/0002_auto_20170606_1731.py @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='helpentry', name='db_tags', - field=models.ManyToManyField(blank=True, help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), + field=models.ManyToManyField(blank=True, help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), ), ] diff --git a/evennia/objects/migrations/0001_initial.py b/evennia/objects/migrations/0001_initial.py index ac528b9fd1..a3b299b6a5 100644 --- a/evennia/objects/migrations/0001_initial.py +++ b/evennia/objects/migrations/0001_initial.py @@ -16,16 +16,16 @@ class Migration(migrations.Migration): name='ObjectDB', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_key', models.CharField(max_length=255, verbose_name=b'key', db_index=True)), - ('db_typeclass_path', models.CharField(help_text=b"this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name=b'typeclass')), - ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), - ('db_lock_storage', models.TextField(help_text=b"locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name=b'locks', blank=True)), - ('db_sessid', models.CommaSeparatedIntegerField(help_text=b'csv list of session ids of connected Account, if any.', max_length=32, null=True, verbose_name=b'session id')), - ('db_cmdset_storage', models.CharField(help_text=b'optional python path to a cmdset class.', max_length=255, null=True, verbose_name=b'cmdset', blank=True)), - ('db_attributes', models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True)), - ('db_destination', models.ForeignKey(related_name=b'destinations_set', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='objects.ObjectDB', help_text=b'a destination, used only by exit objects.', null=True, verbose_name=b'destination')), - ('db_home', models.ForeignKey(related_name=b'homes_set', on_delete=django.db.models.deletion.SET_NULL, verbose_name=b'home location', blank=True, to='objects.ObjectDB', null=True)), - ('db_location', models.ForeignKey(related_name=b'locations_set', on_delete=django.db.models.deletion.SET_NULL, verbose_name=b'game location', blank=True, to='objects.ObjectDB', null=True)), + ('db_key', models.CharField(max_length=255, verbose_name='key', db_index=True)), + ('db_typeclass_path', models.CharField(help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass')), + ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name='creation date')), + ('db_lock_storage', models.TextField(help_text="locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name='locks', blank=True)), + ('db_sessid', models.CommaSeparatedIntegerField(help_text='csv list of session ids of connected Account, if any.', max_length=32, null=True, verbose_name='session id')), + ('db_cmdset_storage', models.CharField(help_text='optional python path to a cmdset class.', max_length=255, null=True, verbose_name='cmdset', blank=True)), + ('db_attributes', models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True)), + ('db_destination', models.ForeignKey(related_name='destinations_set', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='objects.ObjectDB', help_text='a destination, used only by exit objects.', null=True, verbose_name='destination')), + ('db_home', models.ForeignKey(related_name='homes_set', on_delete=django.db.models.deletion.SET_NULL, verbose_name='home location', blank=True, to='objects.ObjectDB', null=True)), + ('db_location', models.ForeignKey(related_name='locations_set', on_delete=django.db.models.deletion.SET_NULL, verbose_name='game location', blank=True, to='objects.ObjectDB', null=True)), ], options={ 'verbose_name': 'Object', diff --git a/evennia/objects/migrations/0002_auto_20140917_0756.py b/evennia/objects/migrations/0002_auto_20140917_0756.py index 916671f38e..785e19e120 100644 --- a/evennia/objects/migrations/0002_auto_20140917_0756.py +++ b/evennia/objects/migrations/0002_auto_20140917_0756.py @@ -18,13 +18,13 @@ class Migration(migrations.Migration): migrations.AddField( model_name='objectdb', name='db_account', - field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, verbose_name=b'account', to=settings.AUTH_USER_MODEL, help_text=b'an Account connected to this object, if any.', null=True), + field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, verbose_name='account', to=settings.AUTH_USER_MODEL, help_text='an Account connected to this object, if any.', null=True), preserve_default=True, ), migrations.AddField( model_name='objectdb', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True), + field=models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True), preserve_default=True, ), ] diff --git a/evennia/objects/migrations/0006_auto_20170606_1731.py b/evennia/objects/migrations/0006_auto_20170606_1731.py index daf46ed329..9b672fcb68 100644 --- a/evennia/objects/migrations/0006_auto_20170606_1731.py +++ b/evennia/objects/migrations/0006_auto_20170606_1731.py @@ -17,16 +17,16 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='objectdb', name='db_attributes', - field=models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), + field=models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), ), migrations.AlterField( model_name='objectdb', name='db_sessid', - field=models.CharField(help_text=b'csv list of session ids of connected Account, if any.', max_length=32, null=True, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name=b'session id'), + field=models.CharField(help_text='csv list of session ids of connected Account, if any.', max_length=32, null=True, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name='session id'), ), migrations.AlterField( model_name='objectdb', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), + field=models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), ), ] diff --git a/evennia/objects/migrations/0007_objectdb_db_account.py b/evennia/objects/migrations/0007_objectdb_db_account.py index b91e315b49..dae9100d35 100644 --- a/evennia/objects/migrations/0007_objectdb_db_account.py +++ b/evennia/objects/migrations/0007_objectdb_db_account.py @@ -27,6 +27,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='objectdb', name='db_account', - field=models.ForeignKey(help_text=b'an Account connected to this object, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.AccountDB', verbose_name=b'account'), + field=models.ForeignKey(help_text='an Account connected to this object, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.AccountDB', verbose_name='account'), ), ] diff --git a/evennia/scripts/migrations/0001_initial.py b/evennia/scripts/migrations/0001_initial.py index 14a26cdf7f..3986e79813 100644 --- a/evennia/scripts/migrations/0001_initial.py +++ b/evennia/scripts/migrations/0001_initial.py @@ -18,20 +18,20 @@ class Migration(migrations.Migration): name='ScriptDB', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_key', models.CharField(max_length=255, verbose_name=b'key', db_index=True)), - ('db_typeclass_path', models.CharField(help_text=b"this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name=b'typeclass')), - ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), - ('db_lock_storage', models.TextField(help_text=b"locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name=b'locks', blank=True)), - ('db_desc', models.CharField(max_length=255, verbose_name=b'desc', blank=True)), - ('db_interval', models.IntegerField(default=-1, help_text=b'how often to repeat script, in seconds. -1 means off.', verbose_name=b'interval')), - ('db_start_delay', models.BooleanField(default=False, help_text=b'pause interval seconds before starting.', verbose_name=b'start delay')), - ('db_repeats', models.IntegerField(default=0, help_text=b'0 means off.', verbose_name=b'number of repeats')), - ('db_persistent', models.BooleanField(default=False, verbose_name=b'survive server reboot')), - ('db_is_active', models.BooleanField(default=False, verbose_name=b'script active')), - ('db_attributes', models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True)), - ('db_obj', models.ForeignKey(blank=True, to='objects.ObjectDB', on_delete=models.CASCADE, help_text=b'the object to store this script on, if not a global script.', null=True, verbose_name=b'scripted object')), - ('db_account', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE, help_text=b'the account to store this script on (should not be set if obj is set)', null=True, verbose_name=b'scripted account')), - ('db_tags', models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True)), + ('db_key', models.CharField(max_length=255, verbose_name='key', db_index=True)), + ('db_typeclass_path', models.CharField(help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass')), + ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name='creation date')), + ('db_lock_storage', models.TextField(help_text="locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.", verbose_name='locks', blank=True)), + ('db_desc', models.CharField(max_length=255, verbose_name='desc', blank=True)), + ('db_interval', models.IntegerField(default=-1, help_text='how often to repeat script, in seconds. -1 means off.', verbose_name='interval')), + ('db_start_delay', models.BooleanField(default=False, help_text='pause interval seconds before starting.', verbose_name='start delay')), + ('db_repeats', models.IntegerField(default=0, help_text='0 means off.', verbose_name='number of repeats')), + ('db_persistent', models.BooleanField(default=False, verbose_name='survive server reboot')), + ('db_is_active', models.BooleanField(default=False, verbose_name='script active')), + ('db_attributes', models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute', null=True)), + ('db_obj', models.ForeignKey(blank=True, to='objects.ObjectDB', on_delete=models.CASCADE, help_text='the object to store this script on, if not a global script.', null=True, verbose_name='scripted object')), + ('db_account', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE, help_text='the account to store this script on (should not be set if obj is set)', null=True, verbose_name='scripted account')), + ('db_tags', models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag', null=True)), ], options={ 'verbose_name': 'Script', diff --git a/evennia/scripts/migrations/0008_auto_20170606_1731.py b/evennia/scripts/migrations/0008_auto_20170606_1731.py index d8d7700f4e..c8b4a84e5f 100644 --- a/evennia/scripts/migrations/0008_auto_20170606_1731.py +++ b/evennia/scripts/migrations/0008_auto_20170606_1731.py @@ -15,11 +15,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='scriptdb', name='db_attributes', - field=models.ManyToManyField(help_text=b'attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), + field=models.ManyToManyField(help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).', to='typeclasses.Attribute'), ), migrations.AlterField( model_name='scriptdb', name='db_tags', - field=models.ManyToManyField(help_text=b'tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), + field=models.ManyToManyField(help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.', to='typeclasses.Tag'), ), ] diff --git a/evennia/scripts/migrations/0009_scriptdb_db_account.py b/evennia/scripts/migrations/0009_scriptdb_db_account.py index 2ad24bf7e2..1d15b69fc0 100644 --- a/evennia/scripts/migrations/0009_scriptdb_db_account.py +++ b/evennia/scripts/migrations/0009_scriptdb_db_account.py @@ -27,6 +27,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='scriptdb', name='db_account', - field=models.ForeignKey(blank=True, help_text=b'the account to store this script on (should not be set if db_obj is set)', null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.AccountDB', verbose_name=b'scripted account'), + field=models.ForeignKey(blank=True, help_text='the account to store this script on (should not be set if db_obj is set)', null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.AccountDB', verbose_name='scripted account'), ), ] diff --git a/evennia/typeclasses/migrations/0001_initial.py b/evennia/typeclasses/migrations/0001_initial.py index 214cc59803..e81039a184 100644 --- a/evennia/typeclasses/migrations/0001_initial.py +++ b/evennia/typeclasses/migrations/0001_initial.py @@ -16,14 +16,14 @@ class Migration(migrations.Migration): name='Attribute', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_key', models.CharField(max_length=255, verbose_name=b'key', db_index=True)), - ('db_value', evennia.utils.picklefield.PickledObjectField(help_text=b'The data returned when the attribute is accessed. Must be written as a Python literal if editing through the admin interface. Attribute values which are not Python literals cannot be edited through the admin interface.', null=True, verbose_name=b'value')), - ('db_strvalue', models.TextField(help_text=b'String-specific storage for quick look-up', null=True, verbose_name=b'strvalue', blank=True)), - ('db_category', models.CharField(max_length=128, blank=True, help_text=b'Optional categorization of attribute.', null=True, verbose_name=b'category', db_index=True)), - ('db_lock_storage', models.TextField(help_text=b'Lockstrings for this object are stored here.', verbose_name=b'locks', blank=True)), - ('db_model', models.CharField(max_length=32, blank=True, help_text=b'Which model of object this attribute is attached to (A natural key like objects.dbobject). You should not change this value unless you know what you are doing.', null=True, verbose_name=b'model', db_index=True)), - ('db_attrtype', models.CharField(max_length=16, blank=True, help_text=b'Subclass of Attribute (None or nick)', null=True, verbose_name=b'attrtype', db_index=True)), - ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name=b'date_created')), + ('db_key', models.CharField(max_length=255, verbose_name='key', db_index=True)), + ('db_value', evennia.utils.picklefield.PickledObjectField(help_text='The data returned when the attribute is accessed. Must be written as a Python literal if editing through the admin interface. Attribute values which are not Python literals cannot be edited through the admin interface.', null=True, verbose_name='value')), + ('db_strvalue', models.TextField(help_text='String-specific storage for quick look-up', null=True, verbose_name='strvalue', blank=True)), + ('db_category', models.CharField(max_length=128, blank=True, help_text='Optional categorization of attribute.', null=True, verbose_name='category', db_index=True)), + ('db_lock_storage', models.TextField(help_text='Lockstrings for this object are stored here.', verbose_name='locks', blank=True)), + ('db_model', models.CharField(max_length=32, blank=True, help_text='Which model of object this attribute is attached to (A natural key like objects.dbobject). You should not change this value unless you know what you are doing.', null=True, verbose_name='model', db_index=True)), + ('db_attrtype', models.CharField(max_length=16, blank=True, help_text='Subclass of Attribute (None or nick)', null=True, verbose_name='attrtype', db_index=True)), + ('db_date_created', models.DateTimeField(auto_now_add=True, verbose_name='date_created')), ], options={ 'verbose_name': 'Evennia Attribute', @@ -34,11 +34,11 @@ class Migration(migrations.Migration): name='Tag', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('db_key', models.CharField(help_text=b'tag identifier', max_length=255, null=True, verbose_name=b'key', db_index=True)), - ('db_category', models.CharField(help_text=b'tag category', max_length=64, null=True, verbose_name=b'category', db_index=True)), - ('db_data', models.TextField(help_text=b'optional data field with extra information. This is not searched for.', null=True, verbose_name=b'data', blank=True)), - ('db_model', models.CharField(help_text=b'database model to Tag', max_length=32, null=True, verbose_name=b'model', db_index=True)), - ('db_tagtype', models.CharField(help_text=b'overall type of Tag', max_length=16, null=True, verbose_name=b'tagtype', db_index=True)), + ('db_key', models.CharField(help_text='tag identifier', max_length=255, null=True, verbose_name='key', db_index=True)), + ('db_category', models.CharField(help_text='tag category', max_length=64, null=True, verbose_name='category', db_index=True)), + ('db_data', models.TextField(help_text='optional data field with extra information. This is not searched for.', null=True, verbose_name='data', blank=True)), + ('db_model', models.CharField(help_text='database model to Tag', max_length=32, null=True, verbose_name='model', db_index=True)), + ('db_tagtype', models.CharField(help_text='overall type of Tag', max_length=16, null=True, verbose_name='tagtype', db_index=True)), ], options={ 'verbose_name': 'Tag', diff --git a/evennia/typeclasses/migrations/0002_auto_20150109_0913.py b/evennia/typeclasses/migrations/0002_auto_20150109_0913.py index 75b5e7f558..3d3876ff37 100644 --- a/evennia/typeclasses/migrations/0002_auto_20150109_0913.py +++ b/evennia/typeclasses/migrations/0002_auto_20150109_0913.py @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='attribute', name='db_model', - field=models.CharField(max_length=32, blank=True, help_text=b"Which model of object this attribute is attached to (A natural key like 'objects.dbobject'). You should not change this value unless you know what you are doing.", null=True, verbose_name=b'model', db_index=True), + field=models.CharField(max_length=32, blank=True, help_text="Which model of object this attribute is attached to (A natural key like 'objects.dbobject'). You should not change this value unless you know what you are doing.", null=True, verbose_name='model', db_index=True), ), ] diff --git a/evennia/typeclasses/migrations/0003_defaultcharacter_defaultexit_defaultguest_defaultobject_defaultplayer_defaultroom_defaultscript_dono.py b/evennia/typeclasses/migrations/0003_defaultcharacter_defaultexit_defaultguest_defaultobject_defaultplayer_defaultroom_defaultscript_dono.py index d308822f70..760e317707 100644 --- a/evennia/typeclasses/migrations/0003_defaultcharacter_defaultexit_defaultguest_defaultobject_defaultplayer_defaultroom_defaultscript_dono.py +++ b/evennia/typeclasses/migrations/0003_defaultcharacter_defaultexit_defaultguest_defaultobject_defaultplayer_defaultroom_defaultscript_dono.py @@ -33,7 +33,7 @@ class Migration(migrations.Migration): }, bases=('accounts.accountdb',), managers=[ - (b'objects', evennia.accounts.manager.AccountManager()), + ('objects', evennia.accounts.manager.AccountManager()), ], ), migrations.CreateModel( @@ -72,7 +72,7 @@ class Migration(migrations.Migration): }, bases=('typeclasses.defaultaccount',), managers=[ - (b'objects', evennia.accounts.manager.AccountManager()), + ('objects', evennia.accounts.manager.AccountManager()), ], ), migrations.CreateModel( diff --git a/evennia/typeclasses/migrations/0004_auto_20151101_1759.py b/evennia/typeclasses/migrations/0004_auto_20151101_1759.py index a14017f6e6..bb4949d015 100644 --- a/evennia/typeclasses/migrations/0004_auto_20151101_1759.py +++ b/evennia/typeclasses/migrations/0004_auto_20151101_1759.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='attribute', name='db_model', - field=models.CharField(max_length=32, blank=True, help_text=b"Which model of object this attribute is attached to (A natural key like 'objects.objectdb'). You should not change this value unless you know what you are doing.", null=True, verbose_name=b'model', db_index=True), + field=models.CharField(max_length=32, blank=True, help_text="Which model of object this attribute is attached to (A natural key like 'objects.objectdb'). You should not change this value unless you know what you are doing.", null=True, verbose_name='model', db_index=True), ), ] diff --git a/evennia/web/utils/general_context.py b/evennia/web/utils/general_context.py index 8fd52eec2e..31fcea52bd 100644 --- a/evennia/web/utils/general_context.py +++ b/evennia/web/utils/general_context.py @@ -68,7 +68,7 @@ def general_context(request): is automatically added to context of all views. """ account = None - if request.user.is_authenticated(): account = request.user + if request.user.is_authenticated: account = request.user puppet = None if account and request.session.get('puppet'): diff --git a/evennia/web/utils/middleware.py b/evennia/web/utils/middleware.py index 16b7ee2091..b480f5b0ff 100644 --- a/evennia/web/utils/middleware.py +++ b/evennia/web/utils/middleware.py @@ -39,7 +39,7 @@ class SharedLoginMiddleware(object): # this is necessary to build the sessid key csession.save() - if account.is_authenticated(): + if account.is_authenticated: # Logged into website if not website_uid: # fresh website login (just from login page) @@ -58,4 +58,4 @@ class SharedLoginMiddleware(object): authenticate(autologin=account) login(request, account) except AttributeError: - logger.log_trace() \ No newline at end of file + logger.log_trace() diff --git a/requirements.txt b/requirements.txt index 4d7088c2bf..f9343cef3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Evennia dependencies, for Linux/Mac platforms # general -django > 1.11, < 2.0 +django >= 2.0, < 2.1 twisted >= 18.0.0, < 19.0.0 pillow == 5.2.0 pytz