diff options
| author | Magnus Hagander | 2021-01-14 15:49:03 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2021-01-14 15:49:42 +0000 |
| commit | e1e5de0c7085613e97664e1e842993b320d3194f (patch) | |
| tree | 2610a4c4beb46a4d92e7e28b3191d58d803c4a0a /pgweb/profserv | |
| parent | d64030ee9bf375090e34a664f675cddb5b42a92e (diff) | |
Move the hint message for organisation to its own file
This is way too much text to duplicate across many places..
Diffstat (limited to 'pgweb/profserv')
| -rw-r--r-- | pgweb/profserv/migrations/0001_initial.py | 4 | ||||
| -rw-r--r-- | pgweb/profserv/models.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/pgweb/profserv/migrations/0001_initial.py b/pgweb/profserv/migrations/0001_initial.py index 23f7270b..6ec9248f 100644 --- a/pgweb/profserv/migrations/0001_initial.py +++ b/pgweb/profserv/migrations/0001_initial.py @@ -3,6 +3,8 @@ from __future__ import unicode_literals from django.db import migrations, models +from pgweb.core.text import ORGANISATION_HINT_TEXT + class Migration(migrations.Migration): @@ -34,7 +36,7 @@ class Migration(migrations.Migration): ('provides_support', models.BooleanField(default=False)), ('provides_hosting', models.BooleanField(default=False)), ('interfaces', models.CharField(max_length=512, null=True, verbose_name='Interfaces (for hosting)', blank=True)), - ('org', models.OneToOneField(db_column='organisation_id', to='core.Organisation', help_text='If no organisations are listed, please check the <a href="/account/orglist/">organisation list</a> and contact the organisation manager or <a href="mailto:webmaster@postgresql.org">webmaster@postgresql.org</a> if none are listed.', verbose_name='organisation', on_delete=models.CASCADE)), + ('org', models.OneToOneField(db_column='organisation_id', to='core.Organisation', help_text=ORGANISATION_HINT_TEXT, verbose_name='organisation', on_delete=models.CASCADE)), ], options={ 'ordering': ('org__name',), diff --git a/pgweb/profserv/models.py b/pgweb/profserv/models.py index 016b4d74..b68419cd 100644 --- a/pgweb/profserv/models.py +++ b/pgweb/profserv/models.py @@ -1,6 +1,7 @@ from django.db import models from pgweb.core.models import Organisation +from pgweb.core.text import ORGANISATION_HINT_TEXT from pgweb.util.moderation import TwostateModerateModel @@ -8,7 +9,7 @@ class ProfessionalService(TwostateModerateModel): org = models.OneToOneField(Organisation, null=False, blank=False, db_column="organisation_id", on_delete=models.CASCADE, verbose_name="organisation", - help_text="If no organisations are listed, please check the <a href=\"/account/orglist/\">organisation list</a> and contact the organisation manager or <a href=\"mailto:webmaster@postgresql.org\">webmaster@postgresql.org</a> if none are listed.") + help_text=ORGANISATION_HINT_TEXT) description = models.TextField(null=False, blank=False) employees = models.CharField(max_length=32, null=True, blank=True) locations = models.CharField(max_length=128, null=True, blank=True) |
