-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
558 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
453 changes: 453 additions & 0 deletions
453
src/ralph_scrooge/migrations/0009_auto__add_syncstatus__add_unique_syncstatus_date_plugin.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models as db | ||
from django.utils.translation import ugettext_lazy as _ | ||
from lck.django.common.models import TimeTrackable | ||
|
||
|
||
class SyncStatus(TimeTrackable): | ||
date = db.DateField() | ||
plugin = db.CharField( | ||
null=False, | ||
blank=False, | ||
max_length=100, | ||
verbose_name=_("plugin name"), | ||
) | ||
success = db.BooleanField( | ||
verbose_name=_("status"), | ||
default=False, | ||
) | ||
remarks = db.TextField( | ||
verbose_name=_("remarks"), | ||
blank=True, | ||
null=True, | ||
) | ||
|
||
class Meta: | ||
verbose_name = _("sync status") | ||
verbose_name_plural = _("sync statuses") | ||
unique_together = ('date', 'plugin') | ||
app_label = 'ralph_scrooge' | ||
|
||
def __unicode__(self): | ||
return '{}/{} : {}'.format( | ||
self.date, | ||
self.plugin, | ||
_('Success') if self.success else _('Failed'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters