diff --git a/game/manage.py b/game/manage.py index 0aae13818b..27c23ee145 100755 --- a/game/manage.py +++ b/game/manage.py @@ -134,5 +134,5 @@ if __name__ == "__main__": nothing about MUDs). Instead, just start Evennia with the webserver component active (this is the default). """ - from django.core.management import execute_manager - execute_manager(settings) + from django.core.management import execute_from_command_line + execute_from_command_line(sys.argv) diff --git a/src/settings_default.py b/src/settings_default.py index e1a45c63f4..c240c4d573 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -40,6 +40,10 @@ TELNET_OOB_ENABLED = False # OBS - currently not fully implemented - do not use! # (Obs - further web configuration can be found below # in the section 'Config for Django web features') WEBSERVER_ENABLED = True +# This is a security setting protecting against host poisoning +# attacks. It defaults to allowing all. In production, make +# sure to change this to your actual host addresses/IPs. +ALLOWED_HOSTS = ["*"] # A list of ports the Evennia webserver listens on WEBSERVER_PORTS = [8000] # Interface addresses to listen to. If 0.0.0.0, listen to all. diff --git a/src/utils/utils.py b/src/utils/utils.py index 7579774230..6d379d80de 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -588,7 +588,7 @@ def check_evennia_dependencies(): # defining the requirements python_min = '2.6' twisted_min = '10.0' - django_min = '1.2' + django_min = '1.4' south_min = '0.7' nt_stop_python_min = '2.7' @@ -600,8 +600,9 @@ def check_evennia_dependencies(): if pversion < python_min: errstring += "\n WARNING: Python %s used. Evennia recommends version %s or higher (but not 3.x)." % (pversion, python_min) if os.name == 'nt' and pversion < nt_stop_python_min: - errstring += "\n WARNING: Windows requires Python %s or higher in order to restart/stop the server from the command line." - errstring += "\n (You need to restart/stop from inside the game.)" % nt_stop_python_min + errstring += "\n WARNING: Python %s used. Windows requires Python %s or higher in order to" % (pversion, nt_stop_python_min) + errstring += " restart/stop the server from the command line." + errstring += "\n (You need to restart/stop from inside the game.)" # Twisted try: import twisted diff --git a/src/web/news/views.py b/src/web/news/views.py index a5034b9338..54f2caabab 100755 --- a/src/web/news/views.py +++ b/src/web/news/views.py @@ -5,7 +5,7 @@ like news-categories/topics and searchable archives. """ -import django.views.generic.list_detail as gv_list_detail +from django.views.generic import ListView from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.conf import settings @@ -66,8 +66,9 @@ def news_archive(request): "browse_url": "/news/archive", "sidebar": sidebar } - - return gv_list_detail.object_list(request, news_entries, template_name='news/archive.html', extra_context=pagevars, paginate_by=entries_per_page) + view = ListView.as_view(queryset=news_entries) + return view(request, template_name='news/archive.html', \ + extra_context=pagevars, paginate_by=entries_per_page) def search_form(request): """ @@ -124,5 +125,5 @@ def search_results(request): "browse_url": "/news/search/results", "sidebar": sidebar } - - return gv_list_detail.object_list(request, news_entries, template_name='news/archive.html', extra_context=pagevars, paginate_by=entries_per_page) + view = ListView.as_view(queryset=news_entries) + return view(request, news_entries, template_name='news/archive.html', extra_context=pagevars, paginate_by=entries_per_page) diff --git a/src/web/templates/admin/index.html b/src/web/templates/admin/index.html index d22920b15e..c9c52dafe4 100644 --- a/src/web/templates/admin/index.html +++ b/src/web/templates/admin/index.html @@ -1,7 +1,7 @@ {% extends "admin/base_site.html" %} -{% load i18n %} +{% load i18n admin_static %} -{% block extrastyle %}{{ block.super }}{% endblock %} +{% block extrastyle %}{{ block.super }}{% endblock %} {% block coltype %}colMS{% endblock %} diff --git a/src/web/templates/admin/players/change_form.html b/src/web/templates/admin/players/change_form.html index 4db01138dd..405f73b916 100644 --- a/src/web/templates/admin/players/change_form.html +++ b/src/web/templates/admin/players/change_form.html @@ -1,6 +1,5 @@ {% extends "admin/base_site.html" %} -{% load i18n admin_modify adminmedia %} -{% load url from future %} +{% load i18n admin_modify admin_static %} {% block extrahead %}{{ block.super }} {% url 'admin:jsi18n' as jsi18nurl %} @@ -8,7 +7,7 @@ {{ media }} {% endblock %} -{% block extrastyle %}{{ block.super }}{% endblock %} +{% block extrastyle %}{{ block.super }}{% endblock %} {% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %} diff --git a/src/web/templates/admin/players/change_list.html b/src/web/templates/admin/players/change_list.html index 33b5201665..15c655089a 100644 --- a/src/web/templates/admin/players/change_list.html +++ b/src/web/templates/admin/players/change_list.html @@ -1,11 +1,10 @@ {% extends "admin/base_site.html" %} -{% load adminmedia admin_list i18n %} -{% load url from future %} +{% load admin_static admin_list i18n %} {% block extrastyle %} {{ block.super }} - + {% if cl.formset %} - + {% endif %} {% if cl.formset or action_form %} {% url 'admin:jsi18n' as jsi18nurl %} diff --git a/src/web/templates/admin/players/stacked.html b/src/web/templates/admin/players/stacked.html index 891341f91a..617ca9987e 100644 --- a/src/web/templates/admin/players/stacked.html +++ b/src/web/templates/admin/players/stacked.html @@ -1,4 +1,4 @@ -{% load i18n adminmedia %} +{% load i18n admin_static %}