mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Merge.
This commit is contained in:
commit
8720df5b49
10 changed files with 30 additions and 27 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
{% load i18n admin_static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
|
||||
|
||||
{% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" />
|
||||
{% if cl.formset %}
|
||||
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />
|
||||
{% endif %}
|
||||
{% if cl.formset or action_form %}
|
||||
{% url 'admin:jsi18n' as jsi18nurl %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% load i18n adminmedia %}
|
||||
{% load i18n admin_static %}
|
||||
<div class="inline-group" id="{{ inline_admin_formset.formset.prefix }}-group">
|
||||
<!--h2>{{ inline_admin_formset.opts.verbose_name_plural|title }}</h2-->
|
||||
{{ inline_admin_formset.formset.management_form }}
|
||||
|
|
@ -40,11 +40,11 @@
|
|||
if (typeof SelectFilter != "undefined"){
|
||||
$(".selectfilter").each(function(index, value){
|
||||
var namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length-1], false, "{% admin_media_prefix %}");
|
||||
SelectFilter.init(value.id, namearr[namearr.length-1], false, "{% static "admin/" %}");
|
||||
});
|
||||
$(".selectfilterstacked").each(function(index, value){
|
||||
var namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length-1], true, "{% admin_media_prefix %}");
|
||||
SelectFilter.init(value.id, namearr[namearr.length-1], true, "{% static "admin/" %}");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
# fix to resolve lazy-loading bug
|
||||
# https://code.djangoproject.com/ticket/10405#comment:11
|
||||
|
|
@ -31,7 +32,7 @@ urlpatterns = patterns('',
|
|||
# Front page
|
||||
url(r'^', include('src.web.website.urls')),
|
||||
# News stuff
|
||||
url(r'^news/', include('src.web.news.urls')),
|
||||
# url(r'^news/', include('src.web.news.urls')),
|
||||
|
||||
# Page place-holder for things that aren't implemented yet.
|
||||
url(r'^tbi/', 'src.web.website.views.to_be_implemented'),
|
||||
|
|
@ -41,7 +42,7 @@ urlpatterns = patterns('',
|
|||
url(r'^admin/', include(admin.site.urls)),
|
||||
|
||||
# favicon
|
||||
url(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url':'/media/images/favicon.ico'}),
|
||||
url(r'^favicon\.ico$', RedirectView.as_view(url='/media/images/favicon.ico')),
|
||||
|
||||
# ajax stuff
|
||||
url(r'^webclient/',include('src.web.webclient.urls')),
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
This structures the (simple) structure of the
|
||||
webpage 'application'.
|
||||
"""
|
||||
from django.views.generic.simple import direct_to_template
|
||||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls import *
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', 'src.web.webclient.views.webclient'),)
|
||||
#url(r'^$', direct_to_template, {'template': 'webclient.html'}),)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue