This is way too much text to duplicate across many places..
--- /dev/null
+ORGANISATION_HINT_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."
from django.db import migrations, models
+from pgweb.core.text import ORGANISATION_HINT_TEXT
+
class Migration(migrations.Migration):
('details', models.TextField(help_text='Complete event description')),
('country', models.ForeignKey(blank=True, to='core.Country', null=True, on_delete=models.CASCADE)),
('language', models.ForeignKey(default='eng', blank=True, to='core.Language', help_text='Primary language for event. When multiple languages, specify this in the event description', null=True, on_delete=models.CASCADE)),
- ('org', models.ForeignKey(verbose_name='Organisation', 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.', on_delete=models.CASCADE)),
+ ('org', models.ForeignKey(verbose_name='Organisation', to='core.Organisation', help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)),
],
options={
'ordering': ('-startdate', '-enddate'),
from django.db import models
from pgweb.core.models import Country, Language, Organisation
+from pgweb.core.text import ORGANISATION_HINT_TEXT
from pgweb.util.moderation import TwostateModerateModel
class Event(TwostateModerateModel):
- org = models.ForeignKey(Organisation, null=False, blank=False, 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.", on_delete=models.CASCADE)
+ org = models.ForeignKey(Organisation, null=False, blank=False, verbose_name="Organisation", help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)
title = models.CharField(max_length=100, null=False, blank=False)
isonline = models.BooleanField(null=False, default=False, verbose_name="Online event")
city = models.CharField(max_length=50, null=False, blank=True)
from django.db import migrations, models
import datetime
+from pgweb.core.text import ORGANISATION_HINT_TEXT
+
class Migration(migrations.Migration):
('date', models.DateField(default=datetime.date.today)),
('title', models.CharField(max_length=200)),
('content', models.TextField()),
- ('org', models.ForeignKey(verbose_name='Organisation', 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.', on_delete=models.CASCADE)),
+ ('org', models.ForeignKey(verbose_name='Organisation', to='core.Organisation', help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)),
],
options={
'ordering': ('-date',),
from django.db import models
from datetime import date
from pgweb.core.models import Organisation, OrganisationEmail
+from pgweb.core.text import ORGANISATION_HINT_TEXT
from pgweb.util.moderation import TristateModerateModel, ModerationState, TwoModeratorsMixin
from django.template.defaultfilters import slugify
class NewsArticle(TwoModeratorsMixin, TristateModerateModel):
- org = models.ForeignKey(Organisation, null=False, blank=False, 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.", on_delete=models.CASCADE)
+ org = models.ForeignKey(Organisation, null=False, blank=False, verbose_name="Organisation", help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)
email = models.ForeignKey(OrganisationEmail, null=True, blank=True, verbose_name="Reply email", help_text="Pick a confirmed email associated with the organisation. This will be used as the reply address of posted news.", on_delete=models.PROTECT)
date = models.DateField(null=False, blank=False, default=date.today, db_index=True)
title = models.CharField(max_length=200, null=False, blank=False)
from django.db import migrations, models
+from pgweb.core.text import ORGANISATION_HINT_TEXT
+
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',),
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
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)