Continue documentation of web components
This commit is contained in:
parent
72e9fd6fd1
commit
4bea4d5703
18 changed files with 450 additions and 84 deletions
|
|
@ -3,16 +3,16 @@
|
|||
This folder holds the functioning code, html, js and css files for use by the
|
||||
Evennia website and -client. This is a standard Django web application.
|
||||
|
||||
1. When a user enters an url (or clicks a link) in their web browser, Django will
|
||||
1. When a user enters an url (or clicks a link) in their web browser, Django will
|
||||
use this incoming request to refer to the `urls.py` file.
|
||||
2. The `urls.py` file will use regex to match the url to a _view_ - a Python function
|
||||
or callable class. The incoming request data will be passed to this code.
|
||||
3. The view will (usually) refer to a _template_, which is a html document with
|
||||
templating slots that allows the system to replace parts of it with dynamic
|
||||
3. The view will (usually) refer to a _template_, which is a html document with
|
||||
templating slots that allows the system to replace parts of it with dynamic
|
||||
content (like how many users are currently in-game).
|
||||
4. The view will render the template with any context into a final HTML page
|
||||
4. The view will render the template with any context into a final HTML page
|
||||
that is returned to the user to view.
|
||||
|
||||
|
||||
I many ways this works like an Evennia Command, with input being the browser's
|
||||
request and the view being the Command's function body for producing a result.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ def _gamestats():
|
|||
"""
|
||||
Generate a the gamestat context for the main index page
|
||||
"""
|
||||
|
||||
|
||||
# Some misc. configurable stuff.
|
||||
# TODO: Move this to either SQL or settings.py based configuration.
|
||||
fpage_account_limit = 4
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
"""
|
||||
This file contains the generic, assorted views that don't fall under one of the other applications.
|
||||
Views are django's way of processing e.g. html templates on the fly.
|
||||
|
||||
"""
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from django.contrib.admin.sites import site
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.admin.views.decorators import staff_member_required
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.db.models.functions import Lower
|
||||
from django.http import HttpResponseBadRequest, HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.generic import TemplateView, ListView, DetailView
|
||||
from django.views.generic.base import RedirectView
|
||||
from django.views.generic.edit import CreateView, UpdateView, DeleteView
|
||||
|
||||
from evennia import SESSION_HANDLER
|
||||
from evennia.help.models import HelpEntry
|
||||
from evennia.objects.models import ObjectDB
|
||||
from evennia.accounts.models import AccountDB
|
||||
from evennia.utils import class_from_module
|
||||
from evennia.utils.logger import tail_log_file
|
||||
from . import forms
|
||||
|
||||
from django.utils.text import slugify
|
||||
|
||||
#
|
||||
# Channel views
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Help views
|
||||
#
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue