EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
DEFAULT_FROM_EMAIL=webmaster@localhost
+
+
+TEMPLATE_OVERRIDE_DIR=laas
ROOT_URLCONF = 'laas_dashboard.urls'
+TEMPLATE_OVERRIDE = os.environ.get("TEMPLATE_OVERRIDE_DIR", "") # the user's custom template dir
+TEMPLATE_DIRS = ["base"] # where all the base templates are
+
+# If the user has a custom template directory,
+# We should search that first. Then we search the
+# root template directory so that we can extend the base
+# templates within the custom template dir.
+if TEMPLATE_OVERRIDE:
+ TEMPLATE_DIRS = [TEMPLATE_OVERRIDE, ""] + TEMPLATE_DIRS
+
+# all template dirs are relative to /project_root/templates/
+dirs = [os.path.join(BASE_DIR, "templates", d) for d in TEMPLATE_DIRS]
+
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(BASE_DIR, 'templates')],
+ 'DIRS': dirs,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
--- /dev/null
+We use a special directory structure here that allows you to define
+your own set of templates than inherit from a common base.
+
+To create your own templates:
+
+Create your new directory as a sibling of base/
+ `mkdir my_templates`
+
+Now you can override any template file in base/ by creating a file of the same name in my_templates.
+
+For example, to replace base/booking/booking_table.html,
+you would create my_templates/booking/booking_table.html. Your template will be loaded instead of the original.
+
+
+You can also inherit from the base templates. For example, if you
+wanted to add to base/dashboard/landing.html, you can create
+a template at my_templates/dashboard/landing.html and add this line to
+the top of the file:
+ {% extends base/dashboard/landing.html %}
+
+This way you can add in new {% block %} tags to the parents and define only
+the new content you need without affecting the default behavior.
+
+
+When your template directory is ready, you must add it to your config.env
<!-- About us -->
<div class="col-12 col-lg-6 mb-4">
<h2 class="border-bottom">About Us</h2>
- <p>The Lab as a Service (LaaS) project aims to help in the development and testing of LFN projects such as
- OPNFV
- by hosting hardware and providing access to the community. Currently, the only participating lab is the
- University of New Hampshire Interoperability Lab (UNH-IOL).</p>
- <p>To get started, you can request access to a server at the right. PTL's have the ability to design and
- book a
- whole block of servers with customized layer2 networks (e.g. a Pharos Pod). Read more here: <a
- href="https://wiki.opnfv.org/display/INF/Lab+as+a+Service+2.0">LaaS Wiki</a></p>
+ {% block about_us %}
+ <p>Here is some information about us!</p>
+ {% endblock about_us %}
</div>
<!-- Get started -->
--- /dev/null
+{% extends "base/dashboard/landing.html" %}
+
+{% block about_us %}
+<p>The Lab as a Service (LaaS) project aims to help in the development and testing of LFN projects such as
+ OPNFV
+ by hosting hardware and providing access to the community. Currently, the only participating lab is the
+ University of New Hampshire Interoperability Lab (UNH-IOL).</p>
+<p>To get started, you can request access to a server at the right. PTL's have the ability to design and
+ book a
+ whole block of servers with customized layer2 networks (e.g. a Pharos Pod). Read more here: <a
+ href="https://wiki.opnfv.org/display/INF/Lab+as+a+Service+2.0">LaaS Wiki</a></p>
+{% endblock about_us %}