Add installation environment details app
This commit is contained in:
7
apps/installation/__init__.py
Normal file
7
apps/installation/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from project_tools.api import register_tool
|
||||
|
||||
from .links import installation_details
|
||||
|
||||
register_tool(installation_details)
|
||||
7
apps/installation/links.py
Normal file
7
apps/installation/links.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from .permissions import PERMISSION_INSTALLATION_DETAILS
|
||||
|
||||
installation_details = {'text': _(u'installation details'), 'view': 'installation_details', 'icon': 'interface_preferences.png', 'permissions': [PERMISSION_INSTALLATION_DETAILS]}
|
||||
3
apps/installation/models.py
Normal file
3
apps/installation/models.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
8
apps/installation/permissions.py
Normal file
8
apps/installation/permissions.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from permissions.models import PermissionNamespace, Permission
|
||||
|
||||
namespace = PermissionNamespace('installation', _(u'Installation'))
|
||||
PERMISSION_INSTALLATION_DETAILS = Permission.objects.register(namespace, 'installation_details', _(u'View installation environment details'))
|
||||
BIN
apps/installation/static/images/icons/interface_preferences.png
Normal file
BIN
apps/installation/static/images/icons/interface_preferences.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
5
apps/installation/urls.py
Normal file
5
apps/installation/urls.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
urlpatterns = patterns('installation.views',
|
||||
url(r'^details/$', 'installation_details', (), 'installation_details'),
|
||||
)
|
||||
37
apps/installation/views.py
Normal file
37
apps/installation/views.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
import platform
|
||||
|
||||
from pbs import lsb_release, uname
|
||||
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db.models.loading import get_model
|
||||
from django.http import Http404
|
||||
from django.core.exceptions import PermissionDenied
|
||||
|
||||
from permissions.models import Permission
|
||||
|
||||
from .permissions import PERMISSION_INSTALLATION_DETAILS
|
||||
|
||||
def installation_details(request):
|
||||
Permission.objects.check_permissions(request.user, [PERMISSION_INSTALLATION_DETAILS])
|
||||
|
||||
paragraphs = []
|
||||
|
||||
paragraphs.append(_(u'Distributor ID: %s') % lsb_release('-i','-s'))
|
||||
paragraphs.append(_(u'Description: %s') % lsb_release('-d','-s'))
|
||||
paragraphs.append(_(u'Release: %s') % lsb_release('-r','-s'))
|
||||
paragraphs.append(_(u'Codename: %s') % lsb_release('-c','-s'))
|
||||
paragraphs.append(_(u'System info: %s') % uname('-a'))
|
||||
paragraphs.append(_(u'Platform: %s') % sys.platform)
|
||||
paragraphs.append(_(u'Processor: %s') % platform.processor())
|
||||
|
||||
return render_to_response('generic_template.html', {
|
||||
'paragraphs': paragraphs,
|
||||
'title': _(u'Installation environment details')
|
||||
}, context_instance=RequestContext(request))
|
||||
@@ -14,16 +14,26 @@ As with the previous release bug fixes and minor feature were the focus
|
||||
for this release too. Long standing `issue #24`_ has been fixed and document
|
||||
check outs have been added too as per the feature request posted as `issue #26`_.
|
||||
|
||||
#TODO: add improvements to history app info
|
||||
|
||||
What's new in Mayan EDMS v0.12.2
|
||||
================================
|
||||
|
||||
Document check outs
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Installation environment app
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Upgrading from a previous version
|
||||
=================================
|
||||
|
||||
Start off by adding the new requirements::
|
||||
|
||||
$ pip install -r requirements/production.txt
|
||||
|
||||
Migrate existing database schema with::
|
||||
|
||||
$ ./manage.py migrate checkouts
|
||||
|
||||
@@ -17,3 +17,4 @@ South==0.7.5
|
||||
https://github.com/rosarior/python-gnupg/zipball/0.2.8
|
||||
python-hkp==0.1.3
|
||||
requests==0.13.1
|
||||
pbs==0.105
|
||||
|
||||
@@ -175,6 +175,7 @@ INSTALLED_APPS = (
|
||||
'rest_api',
|
||||
'document_signatures',
|
||||
'checkouts',
|
||||
'installation',
|
||||
|
||||
# Has to be last so the other apps can register it's signals
|
||||
'signaler',
|
||||
|
||||
Reference in New Issue
Block a user