===== Restart =====
Restart is a simple Django app to allow administrators to restart the application by touching the wsgi file.
Quick start
Add “restart” to your INSTALLED_APPS settings. For example:
INSTALLED_APPS = ( ... 'restart', 'admin_shortcuts', # An optional package, not required 'djangocms_admin_style', # An optional package, not required 'django.contrib.admin', )Add ‘restart.Loader’ to your TEMPLATE_LOADERS in your settings file:
TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', 'restart.Loader', # 'django.template.loaders.eggs.Loader', )Setup the name of your wsgi file in your settings, for example:
WSGI_NAME = "django.wsgi"
This app also uses the SITE_ROOT variable. If this is not defined it will attempt to guess the site-root, however it is recommended that this is defined. It should be the folder which contains your wsgi file.
Run python manage.py syncdb to create the restart model.
Run python manage.py collectstatic to collect the required static files.
When accessing the admin, you should now see a small arrow on the bottom right of your window at all times. Clicking on this will show the server uptime based on the wsgi file, and allow restarting via touch.
Django Suit
If using Django-suit, create a new (or edit your existing) admin/base.html file in your templates with the following code:
{% extends "suit:admin/base.html" %}
{% block extrahead %}{% include 'admin/inc/extrahead.html' %}{% endblock %}
Django Admin tools
If using Django admin tools, create a new (or edit your existing) admin/base.html file in your templates with the following code:
{% extends "admin_tools.theming:admin/base.html" %}
{% block extrahead %}{% include 'admin/inc/extrahead.html' %}{% endblock %}
Custom base template
If you have a custom admin/base.html file or you want to install manually, you can skip step 2 above, and replace the line:
{% block extrahead %}{% endblock %}
with:
{% block extrahead %}{% include 'admin/inc/extrahead.html' %}{% endblock %}
Tested with
Django 1.6
Django CMS 3.0rc1
Django base admin styles
Django CMS Admin styles (optional)
Django CMS Admin styles (optional)
Django Admin shortcuts (optional)
Reversion (tested with 1.8.0, optional)
Requires
This app should work with verisons of Django below 1.6, it has been tested down to 1.3. No other packages should be required.
Todo
Ensure works with grapelli, django-suit and other admin alternative templates.
Tests
Other
The template loader code is based on: http://djangosnippets.org/snippets/1376/
Metadata
Release files for django-restart 0.2.8.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-restart-0.2.8.7.tar.gz | 10.4 kB | Without provenance | Details |
Release files / django-restart-0.2.8.7.tar.gz
| Download URL | django-restart-0.2.8.7.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94606d7111719c657b3d3694f469c1ae4215586046d9bb9f4707be3dd1e4a4d2
|
|
BLAKE2b-256 checksum How to use checksums |
bd8c0144c21c1a5ab97289bf0139797a47dc76f45ee2267aa437c80ef3d6c1f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-restart 0.2.8.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.