Skip to content

Commit

Permalink
added a default template page with some screenshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
darius BERNARD committed Feb 14, 2017
1 parent 77eadc1 commit 0c8ce3d
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 1 deletion.
8 changes: 7 additions & 1 deletion testproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'testproject', 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -114,6 +114,12 @@

STATIC_URL = '/static/'

STATICFILES_DIRS = [
os.path.join(BASE_DIR, "testproject", "static"),
]

STATIC_ROOT = os.path.join(BASE_DIR, "static_root")


LOGGING = {
'version': 1,
Expand Down
Binary file added testproject/static/screenshot/DL_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testproject/static/screenshot/config_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testproject/static/screenshot/create_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testproject/static/screenshot/create_trigger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions testproject/templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Django Dynamic Logging</title>
<style>img {border: solid black 1px; border-radius: 15px;}</style>
</head>
<body>

<h1>Welcome to django Dynamic Logging test page</h1>
<p>
this project hosted on github is meant to update the python logging setting at runtime and in live running systems.<br/>
to try it in this demo, go to the <a href="{% url 'admin:app_list' app_label='dynamic_logging' %}">admin</a> ,
login and play with the configurations.<br />
<img src="{% static 'screenshot/DL_home.png' %}" alt="admin home" />
</p>

<h2>how to start</h2>

<h4>create a config</h4>
<p>
a config represent the full logging configuration for all the python process that run django. only one
config can be enabled at a given time. a config can override the folowing logging property:
</p>
<ul>
<li>handlers level</li>
<li>loggers list (remove,add)</li>
<li>logger level</li>
<li>logger handlers list</li>
<li>logger propagate</li>
</ul>
<img src="{% static 'screenshot/create_config.png' %}" alt="create config screenshot" />


<h4>create a trigger</h4>

<p>
to enable a config, one of his triggers must be enabled and the latest valid trigger. a Trigger have a start_date and
a end_date. if the current time is between them, your trigger is valid. if you have more than one trigger valid at a given
time, the one with the latest start_date will be the chosen one.
you can put an empty date into start_date and end_date which mean from startup and forever respectively.<br />
<img src="{% static 'screenshot/create_trigger.png' %}" alt="create trigger screenshot" />

</p>

<h4>check the current config</h4>

<p>
to check the current config, the admin's config list will tell you which one is active.
<img src="{% static 'screenshot/config_list.png' %}" alt="screen config list"/>
</p>

</body>
</html>
2 changes: 2 additions & 0 deletions testproject/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic.base import TemplateView

import testproject.testapp.urls

urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='home.html')),
url(r'^admin/', include(admin.site.urls)),
url(r'^testapp/', include(testproject.testapp.urls)),
]

0 comments on commit 0c8ce3d

Please sign in to comment.