Also for inline model.

parent cafb0132
......@@ -22,6 +22,19 @@ from .models import Coordinate, Organization, OrganizationType, Promise, Url
logger = logging.getLogger(__name__)
PROMISE_DESCRIPTION = """
<p>A 'promise' is an indication by an organisation representitive that an improvement
has been made which will alter the organizations score. A generic message will be
displayed on the organization report with the creation and expiry date of the promise
until it expires.</p>
<p>This indication is to overcome the problem of a negative score even though improvement
are made, but the score cannot reflect them yet due to technical or bureaucratic reasons.</p>
<p>It is not intended for long term promises of improvement that have not been applied or
put in to progress. The promised improvement must be verifiable by Faalkaart within a
handfull of days.</p>
"""
class UrlAdminInline(CompactInline):
model = Url
extra = 0
......@@ -57,6 +70,13 @@ class PromiseAdminInline(CompactInline):
extra = 0
ordering = ["-created_on"]
fieldsets = (
(None, {
'fields': ('organization', 'created_on', 'expires_on', 'notes'),
'description': PROMISE_DESCRIPTION,
}),
)
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('name', 'type', 'country')
......@@ -235,19 +255,6 @@ class CoordinateAdmin(admin.ModelAdmin):
fields = ('organization', 'geojsontype', 'area')
PROMISE_DESCRIPTION = """
<p>A 'promise' is an indication by an organisation representitive that an improvement
has been made which will alter the organizations score. A generic message will be
displayed on the organization report with the creation and expiry date of the promise
until it expires.</p>
<p>This indication is to overcome the problem of a negative score even though improvement
are made, but the score cannot reflect them yet due to technical or bureaucratic reasons.</p>
<p>It is not intended for long term promises of improvement that have not been applied or
put in to progress. The promised improvement must be verifiable by Faalkaart within a
handfull of days.</p>
"""
class PromiseAdmin(admin.ModelAdmin):
list_display = ('organization', 'created_on', 'expires_on')
search_fields = ('organization',)
......
......@@ -33,13 +33,13 @@ class CustomIndexDashboard(Dashboard):
_('Failmap resources'),
children=[
{
'title': _('Github Repository'),
'url': 'https://github.com/failmap/',
'title': _('Gitlab Repository'),
'url': 'https://gitlab.com/failmap/',
'external': True,
},
{
'title': _('Admin repository'),
'url': 'https://github.com/failmap/admin',
'url': 'https://gitlab.com/failmap/admin',
'external': True,
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment