refactor: Epistemic shift from MUD to Spatial Research Environment
This commit is contained in:
1 parent
34bd27b1b4
commit
b5ace2e6f9
72 files changed
+10
-10
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# Webclient Views
|
||||
|
||||
The webclient is mainly controlled by Javascript directly in the browser, so
|
||||
you usually customize it via `mygame/web/static/webclient/js/` - files instead.
|
||||
|
||||
There is very little you can change from here, unless you want to implement
|
||||
your very own client from scratch.
|
||||
|
||||
## On views
|
||||
|
||||
A 'view' is python code (a function or callable class) responsible for
|
||||
producing a HTML page for a user to view in response for going to a given URL
|
||||
in their browser. In Evennia lingo, it's similar in function to a Command, with
|
||||
the input/args being the URL/request and the output being a new web-page.
|
||||
|
||||
The urls.py file contains regular expressions that are run against the provided
|
||||
URL - when a match is found, the execution is passed to a view which is then
|
||||
responsible (usually) for producing the web page by filling in a _template_ - a
|
||||
HTML document that can have special tags in it that are replaced for dynamic
|
||||
content. It then returns the finished HTML page for the user to view.
|
||||
|
||||
See the [Django docs on Views](https://docs.djangoproject.com/en/4.1/topics/http/views/) for
|
||||
more information.
|
||||
Whitespace-only changes.
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
This reroutes from an URL to a python view-function/class.
|
||||
|
||||
The main web/urls.py includes these routes for all urls starting with `webclient/`
|
||||
(the `webclient/` part should not be included again here).
|
||||
|
||||
"""
|
||||
|
||||
from django.urls import path
|
||||
|
||||
from evennia.web.webclient.urls import urlpatterns as evennia_webclient_urlpatterns
|
||||
|
||||
# add patterns here
|
||||
urlpatterns = [
|
||||
# path("url-pattern", imported_python_view),
|
||||
# path("url-pattern", imported_python_view),
|
||||
]
|
||||
|
||||
# read by Django
|
||||
urlpatterns = urlpatterns + evennia_webclient_urlpatterns
|
||||
Reference in new issue
Block a user