Skip to content

Commit

Permalink
added id to ChartView, updated readme.md, added Pillow to setup requi…
Browse files Browse the repository at this point in the history
…rements, fixed views for Django >= 1.7
  • Loading branch information
Martin Schroeder committed Feb 10, 2015
1 parent 2d59060 commit 0fef23d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ and add the following PyScada specific parameters to your settings (PySadaServer
```
STATIC_ROOT = BASE_DIR + '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR + '/media/'
# PyScada settings
# https://github.com/trombastic/PyScada
Expand All @@ -103,23 +107,28 @@ PID_ROOT = BASE_DIR + '/run/'
#
PYSCADA_CLIENTS = (
('modbus','Modbus Client',),
('systemstat','Monitor Local System',),
)
# parameters for the Modbus Client
# polling_interval how often the modbus client requests data
# from devices and write to the cache
#
# recording_intervall how often the data is written to the database
# recording_intervall how often the data is written to the database
#
# pid_file file were the daemon pid is stored
PYSCADA_MODBUS = {
'polling_interval':1,
'recording_intervall':5,
'cache_timeout':1440,
'pid_file_name': 'modbus-daemon.pid'
'polling_interval':5,
'recording_interval':5,
'pid_file_name': 'daemon-modbus.pid'
}
PYSCADA_SYSTEMSTAT = {
'polling_interval':5,
'recording_interval':5,
'pid_file_name': 'daemon-sysstat.pid'
}
```

urls.py
Expand Down
2 changes: 1 addition & 1 deletion pyscada/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-

__version__ = '0.6.12'
__version__ = '0.6.13'
__author__ = 'Martin Schroeder'
6 changes: 4 additions & 2 deletions pyscada/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

class VariableAdminForm(forms.ModelForm):
json_configuration = forms.CharField(widget=forms.Textarea)

class Meta:
model = Variable
fields = []
model = Variable

class VariableImportAdmin(admin.ModelAdmin):
actions = None
Expand Down Expand Up @@ -126,4 +128,4 @@ def has_delete_permission(self, request, obj=None):
admin.site.register(ClientWriteTask,ClientWriteTaskAdmin)
admin.site.register(Log,LogAdmin)
admin.site.register(BackgroundTask,BackgroundTaskAdmin)
admin.site.register(RecordedDataCache,RecordedDataCacheAdmin)
admin.site.register(RecordedDataCache,RecordedDataCacheAdmin)
6 changes: 4 additions & 2 deletions pyscada/hmi/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ class ChartAdmin(admin.ModelAdmin):
#ordering = ['position',]
search_fields = ['name',]
filter_horizontal = ('variables',)
list_display = ('title',)
List_display_link = ('title',)
list_display = ('id','title',)
list_filter = ('widget',)
form = ChartForm
def name(self, instance):
return instance.variables.name
Expand Down Expand Up @@ -92,4 +94,4 @@ class CustomHTMLPanelAdmin(admin.ModelAdmin):
admin.site.register(CustomHTMLPanel,CustomHTMLPanelAdmin)
admin.site.register(ChartSet)
admin.site.register(Widget,WidgetAdmin)
admin.site.register(View,ViewAdmin)
admin.site.register(View,ViewAdmin)
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
'pymodbus>=1.2',
'numpy>=1.6.0',
'h5py>=2.1.1',
'psutil>=2.1.1'
'psutil>=2.1.1',
'pillow'
],
packages=find_packages(exclude=["project", "project.*"]),
include_package_data=True,
zip_safe=False,
test_suite='runtests.main',
)
)

0 comments on commit 0fef23d

Please sign in to comment.