Skip to content

Commit

Permalink
Merged v1.5.5 into master.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Jan 19, 2017
1 parent 1a6356a commit 5d1918b
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 12 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ Please make sure you have a fresh **database backup** before upgrading! Upgradin



v1.5.5 - 2017-01-19
^^^^^^^^^^^^^^^^^^^

**Tickets resolved in this release:**

- Remove readonly restriction for editing statistics in admin interface (`#242 <https://github.com/dennissiemensma/dsmr-reader/issues/242>`_).



v1.5.4 - 2017-01-12
^^^^^^^^^^^^^^^^^^^

Expand Down
5 changes: 2 additions & 3 deletions dsmr_stats/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.forms import widgets
from django.db import models

from dsmr_backend.mixins import ReadOnlyAdminModel
from .models.note import Note
from .models.statistics import HourStatistics, DayStatistics

Expand All @@ -26,7 +25,7 @@ def get_form(self, request, obj=None, **kwargs):


@admin.register(DayStatistics)
class DayStatisticsAdmin(ReadOnlyAdminModel):
class DayStatisticsAdmin(admin.ModelAdmin):
""" Read only model. """
ordering = ['-day']
list_display = ('day', 'electricity_merged', 'electricity_returned_merged', 'total_cost')
Expand All @@ -36,7 +35,7 @@ class DayStatisticsAdmin(ReadOnlyAdminModel):


@admin.register(HourStatistics)
class HourStatisticsAdmin(ReadOnlyAdminModel):
class HourStatisticsAdmin(admin.ModelAdmin):
""" Read only model. """
ordering = ['-hour_start']
list_display = ('hour_start', 'electricity_merged', 'electricity_returned_merged')
Expand Down
23 changes: 23 additions & 0 deletions dsmr_stats/migrations/0009_statistics_editable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-19 18:15
from __future__ import unicode_literals

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('dsmr_stats', '0008_meta_names'),
]

operations = [
migrations.AlterModelOptions(
name='daystatistics',
options={'default_permissions': (), 'verbose_name': 'Day statistics (automatically generated data)', 'verbose_name_plural': 'Day statistics (automatically generated data)'},
),
migrations.AlterModelOptions(
name='hourstatistics',
options={'default_permissions': (), 'verbose_name': 'Hour statistics (automatically generated data)', 'verbose_name_plural': 'Hour statistics (automatically generated data)'},
),
]
4 changes: 2 additions & 2 deletions dsmr_stats/models/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def electricity_returned_merged(self):

class Meta:
default_permissions = tuple()
verbose_name = _('Day statistics (read only)')
verbose_name = _('Day statistics (automatically generated data)')
verbose_name_plural = verbose_name

def __str__(self):
Expand Down Expand Up @@ -94,7 +94,7 @@ def electricity_returned_merged(self):

class Meta:
default_permissions = tuple()
verbose_name = _('Hour statistics (read only)')
verbose_name = _('Hour statistics (automatically generated data)')
verbose_name_plural = verbose_name

def __str__(self):
Expand Down
2 changes: 1 addition & 1 deletion dsmrreader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
from django.utils.version import get_version


VERSION = (1, 5, 4, 'final', 0)
VERSION = (1, 5, 5, 'final', 0)

__version__ = get_version(VERSION)
Binary file modified dsmrreader/locales/nl/LC_MESSAGES/django.mo
Binary file not shown.
15 changes: 9 additions & 6 deletions dsmrreader/locales/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: DSMR Reader v1.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-11 21:11+0100\n"
"PO-Revision-Date: 2017-01-08 20:19+0100\n"
"POT-Creation-Date: 2017-01-19 19:25+0100\n"
"PO-Revision-Date: 2017-01-19 19:10+0100\n"
"Last-Translator: Dennis Siemensma <github@dennissiemensma.nl>\n"
"Language-Team: Dennis Siemensma <github@dennissiemensma.nl>\n"
"Language: nl\n"
Expand Down Expand Up @@ -933,14 +933,14 @@ msgstr "Hoogste temperatuur"
msgid "Average temperature"
msgstr "Gemiddelde temperatuur"

msgid "Day statistics (read only)"
msgstr "Dagstatistieken (alleen lezen)"
msgid "Day statistics (automatically generated data)"
msgstr "Dagstatistieken (automatisch gegenereerd)"

msgid "Hour start"
msgstr "Begintijd uur"

msgid "Hour statistics (read only)"
msgstr "Uurstatistieken (alleen lezen)"
msgid "Hour statistics (automatically generated data)"
msgstr "Uurstatistieken (automatisch gegenereerd)"

msgid "Weather station Arcen"
msgstr "Weerstation Arcen"
Expand Down Expand Up @@ -1124,3 +1124,6 @@ msgstr "Nederlands"

msgid "English"
msgstr "Engels"

#~ msgid "Day statistics (read only)"
#~ msgstr "Dagstatistieken (alleen lezen)"

0 comments on commit 5d1918b

Please sign in to comment.