From ae3c3c526eb7101a9ba8a91bc09452a58584d3d7 Mon Sep 17 00:00:00 2001 From: Tehom Date: Thu, 9 Nov 2017 22:33:08 -0500 Subject: [PATCH 1/5] Fix search and timeout with large database --- evennia/comms/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evennia/comms/admin.py b/evennia/comms/admin.py index 52ed7993fd..fde7cc4c42 100644 --- a/evennia/comms/admin.py +++ b/evennia/comms/admin.py @@ -53,10 +53,11 @@ class ChannelAdmin(admin.ModelAdmin): list_display = ('id', 'db_key', 'db_lock_storage', "subscriptions") list_display_links = ("id", 'db_key') ordering = ["db_key"] - search_fields = ['id', 'db_key', 'db_aliases'] + search_fields = ['id', 'db_key', 'db_tags__db_key'] save_as = True save_on_top = True list_select_related = True + raw_id_fields = ('db_object_subscriptions', 'db_account_subscriptions',) fieldsets = ( (None, {'fields': (('db_key',), 'db_lock_storage', 'db_account_subscriptions', 'db_object_subscriptions')}), ) From 989a046bc99c269a0ee625113373ed5bf72ecac2 Mon Sep 17 00:00:00 2001 From: Tehom Date: Fri, 10 Nov 2017 00:34:20 -0500 Subject: [PATCH 2/5] Move deprecated TEMPLATE_DEBUG setting to the 'options' field of TEMPLATES. --- evennia/settings_default.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/settings_default.py b/evennia/settings_default.py index 779d2e3245..b1e2a7a79e 100644 --- a/evennia/settings_default.py +++ b/evennia/settings_default.py @@ -636,8 +636,6 @@ RSS_UPDATE_INTERVAL = 60 * 10 # 10 minutes # browser to display. Note however that this will leak memory when # active, so make sure to turn it off for a production server! DEBUG = False -# While true, show "pretty" error messages for template syntax errors. -TEMPLATE_DEBUG = DEBUG # Emails are sent to these people if the above DEBUG value is False. If you'd # rather prefer nobody receives emails, leave this commented out or empty. ADMINS = () # 'Your Name', 'your_email@domain.com'),) @@ -730,7 +728,9 @@ TEMPLATES = [{ 'django.template.context_processors.media', 'django.template.context_processors.debug', 'sekizai.context_processors.sekizai', - 'evennia.web.utils.general_context.general_context'] + 'evennia.web.utils.general_context.general_context'], + # While true, show "pretty" error messages for template syntax errors. + "debug": DEBUG } }] From 4d7a1f9b9ada6715c95ba913da55d4bd47a40fc2 Mon Sep 17 00:00:00 2001 From: Tehom Date: Fri, 10 Nov 2017 14:42:21 -0500 Subject: [PATCH 3/5] Fix sethome's help file --- evennia/commands/default/building.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index ff487626a1..f4a001e6d2 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -1087,7 +1087,7 @@ class CmdSetHome(CmdLink): set an object's home location Usage: - @home [= ] + @sethome [= ] The "home" location is a "safety" location for objects; they will be moved there if their current location ceases to exist. All @@ -1098,13 +1098,13 @@ class CmdSetHome(CmdLink): """ key = "@sethome" - locks = "cmd:perm(@home) or perm(Builder)" + locks = "cmd:perm(@sethome) or perm(Builder)" help_category = "Building" def func(self): """implement the command""" if not self.args: - string = "Usage: @home [= ]" + string = "Usage: @sethome [= ]" self.caller.msg(string) return From 74bbd0efeaa16a1fd7f6b07e88748af59a89f637 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Sat, 11 Nov 2017 12:29:07 -0500 Subject: [PATCH 4/5] Change pop() to first() --- evennia/commands/default/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/commands/default/admin.py b/evennia/commands/default/admin.py index bd6e55adaa..9da061cc04 100644 --- a/evennia/commands/default/admin.py +++ b/evennia/commands/default/admin.py @@ -301,7 +301,7 @@ class CmdDelAccount(COMMAND_DEFAULT_CLASS): # one single match - account = accounts.pop() + account = accounts.first() if not account.access(caller, 'delete'): string = "You don't have the permissions to delete that account." From 60e3e0e864917dde427037e3f5da0d5a19b267a6 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 29 Nov 2017 19:55:13 +0100 Subject: [PATCH 5/5] Update instructions for installing SSL requirements --- evennia/server/portal/ssl.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/evennia/server/portal/ssl.py b/evennia/server/portal/ssl.py index 209e08696f..8b638ed23d 100644 --- a/evennia/server/portal/ssl.py +++ b/evennia/server/portal/ssl.py @@ -13,8 +13,13 @@ try: except ImportError as error: errstr = """ {err} - SSL requires the PyOpenSSL library: - pip install pyopenssl + SSL requires the PyOpenSSL library and dependencies: + + pip install pyopenssl pycrypto enum pyasn1 service_identity + + Stop and start Evennia again. If no certificate can be generated, you'll + get a suggestion for a (linux) command to generate this locally. + """ raise ImportError(errstr.format(err=error))