Cleaned up the web folder to make two separate 'apps'-webclient and website, each with their own static and template dirs. Also merged the prosimii template files into the website template folder. This will make it clearer how to override, since the static/template_override dirs will now look like website/static/... etc rather than using the template names, of which we only ever have used one anyway.

This commit is contained in:
Griatch 2016-01-23 21:56:07 +01:00
parent 5ea9d100d9
commit 4fd06b8976
23 changed files with 91 additions and 100 deletions

View file

@ -83,14 +83,14 @@ STATIC_ROOT = os.path.join(GAME_DIR, "web", "static")
# Directories from which static files will be gathered from.
STATICFILES_DIRS = (
os.path.join(GAME_DIR, "web", "static_overrides"),
os.path.join(EVENNIA_DIR, "web", "static"),)
os.path.join(EVENNIA_DIR, "web", "website", "static"),)
# We setup the location of the website template as well as the admin site.
TEMPLATE_DIRS = (
os.path.join(GAME_DIR, "web", "template_overrides", ACTIVE_TEMPLATE),
os.path.join(GAME_DIR, "web", "template_overrides"),
os.path.join(EVENNIA_DIR, "web", "templates", ACTIVE_TEMPLATE),
os.path.join(EVENNIA_DIR, "web", "templates"),)
os.path.join(EVENNIA_DIR, "web", "website", "templates", ACTIVE_TEMPLATE),
os.path.join(EVENNIA_DIR, "web", "website", "templates"),)
# The secret key is randomly seeded upon creation. It is used to sign
# Django's cookies. Do not share this with anyone. Changing it will

View file

@ -1,25 +1,18 @@
"""
Url definition file to redistribute incoming URL requests to django
views. Search the Django documentation for "URL dispatcher" for more
help.
"""
from django.conf.urls import url, include
# default evennia patterns
from evennia.web.urls import urlpatterns
#
# File that determines what each URL points to. This uses _Python_ regular
# expressions, not Perl's.
#
# See:
# http://diveintopython.org/regular_expressions/street_addresses.html#re.matching.2.3
#
# Add your own URL patterns to the patterns variable below, and then change
#
# These are Django URL patterns, so you should look up how to use these at
# https://docs.djangoproject.com/en/1.6/topics/http/urls/
# Follow the full Django tutorial to learn how to create web views for Evennia.
# https://docs.djangoproject.com/en/1.6/intro/tutorial01/
patterns = [
# eventual custom patterns
custom_patterns = [
# url(r'/desired/url/', view, name='example'),
]
urlpatterns = patterns + urlpatterns
# this is used by Django.
urlpatterns = custom_patterns + urlpatterns