From a6187ed997ff41bb7ca86658a401133a5704268a Mon Sep 17 00:00:00 2001 From: Kelketek Rritaa Date: Sat, 28 Jun 2014 16:35:57 -0500 Subject: [PATCH] Minor cleanup in a readme and a method signature. --- game/gamesrc/web/static/README.md | 10 ++++++---- src/web/webclient/views.py | 8 +++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/game/gamesrc/web/static/README.md b/game/gamesrc/web/static/README.md index 8ba3d8ff20..7b76fffe1f 100644 --- a/game/gamesrc/web/static/README.md +++ b/game/gamesrc/web/static/README.md @@ -1,5 +1,7 @@ -This folder is used by Django's staticfiles application for gathering all static files (CSS, JS, etc) into one place -from the various sources that they might be gathered from. +If you want to override one of the static files (such as a CSS or JS file) used by Evennia or a Django app installed in your Evennia project, copy it into this folder, and it will be placed in the static folder when you run: -Do not edit files in this directory. Instead, read up on Django's static file handling to learn how to create Django -apps with their own static files. \ No newline at end of file + python manage.py collectstatic + +or reload the server via the command line. + +Do note you may have to reproduce any preceeding directory structures for the file to end up in the right place. diff --git a/src/web/webclient/views.py b/src/web/webclient/views.py index d74ff4f5e2..c8ea3c82ab 100644 --- a/src/web/webclient/views.py +++ b/src/web/webclient/views.py @@ -4,12 +4,11 @@ This contains a simple view for rendering the webclient page and serve it eventual static content. """ +from django.shortcuts import render -from django.shortcuts import render_to_response, redirect -from django.template import RequestContext -from django.conf import settings from src.players.models import PlayerDB + def webclient(request): """ Webclient page template loading. @@ -25,5 +24,4 @@ def webclient(request): # as an example we send the number of connected players to the template pagevars = {'num_players_connected': nsess} - context_instance = RequestContext(request) - return render_to_response('webclient.html', pagevars, context_instance) + return render(request, 'webclient.html', pagevars)