Set verbose name on a number of fields previously lacking
authorMagnus Hagander <magnus@hagander.net>
Sat, 17 Nov 2018 18:09:59 +0000 (19:09 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 17 Nov 2018 18:09:59 +0000 (19:09 +0100)
14 files changed:
docs/confreg/callforpapers.md
docs/confreg/configuring.md
docs/confreg/registrations.md
docs/confreg/schedule.md
docs/confreg/sponsors.md
docs/confreg/vouchers.md
postgresqleu/confreg/migrations/0001_initial.py
postgresqleu/confreg/migrations/0002_auto_20160108_1924.py
postgresqleu/confreg/migrations/0003_typofix.py
postgresqleu/confreg/migrations/0005_vat.py
postgresqleu/confreg/migrations/0007_new_specialtype.py
postgresqleu/confreg/models.py
postgresqleu/confsponsor/migrations/0001_initial.py
postgresqleu/confsponsor/models.py

index 45e53229f8f81f351b8c0e09b798360975f7db39..9ca1d1d3421d14fdc60154696f7368ef471fea54 100644 (file)
@@ -13,9 +13,9 @@ introductory text (if you want one), and decide if you want to ask for
 skill levels.
 
 If you want to ask for Tracks in the call for papers, make sure you
-[create them](schedule#tracks) first, and flag them as "in
-cfp". If no tracks with "in cfp" set exists, the track field will
-automatically be excluded from the call for papers form.
+[create them](schedule#tracks) first, and flag them as "in call for
+papers". If no tracks with "in call for papers" set exists, the track
+field will automatically be excluded from the call for papers form.
 
 Each speaker has to set up a speaker profile. This profile is shared
 between all the conferences on the system, so if they have already set
index e1d4b4da497100d32d49cc1bcae21cf6dec55c59..ec5718bd8db0b55ee8be20df1c4ec87beece6c09 100644 (file)
@@ -115,7 +115,7 @@ completed their registration.
 Welcome email contents
 : Contents of said welcome email
 
-Additionalintro
+Additional intro
 : Text shown on the registration page just above the list of
 additional options. Typically introduces what the additional options
 are. Can contain markdown.
@@ -202,7 +202,7 @@ Skill levels
 all sessions, and should they be displayed on the schedule and session
 lists.
 
-Callforpapersintro
+Call for papers intro
 : Text shown on the [call for papers](callforpapers) page, above the
 actual call for papers. Can contain HTML.
 
index 14f5d6af2cb40a2f0bcb73f235a8c9d9cbcdea55..7eb00fd489a84dfb5087c2a2e1de72cf9b3c6d13 100644 (file)
@@ -204,10 +204,10 @@ what's in the registration, but they are both traceable to each other.
 
 ### Registration types <a name="regtypes"></a>
 
-Regtype
+Registration type
 : Name of the registration type as shown to the user
 
-Regclass
+Registration class
 : Registration class that this registration belongs to. This can be left
 unspecified, but that is likely to cause issues with things like badge generation.
 
@@ -218,7 +218,7 @@ VAT is used, the cost is specified without VAT.
 Active
 : Whether this registration class can be used at this point.
 
-Activeuntil
+Active until
 : The use-before-date for this registration type. If left empty, the registration type
 can be used as long as it's active and registration is open.
 
@@ -230,14 +230,14 @@ Sortkey
 : An integer specifying how this registration type should be sorted. Lower numbers are
 sorted first.
 
-Specialtype
+Special type
 : If this registration type has special rules on it
 
 Require phone
 : If attendees registering with this registration type should be required to enter
 their phone number (typically for speakers and/or staff)
 
-Alertmessage
+Alert message
 : This message is shown in a pop-up window when the user tries to complete the
 registration. This is typically used for things like informing people of special
 requirements such as a student ID to access student discounts.
@@ -279,7 +279,7 @@ Cost
 : Cost of this option, if any. If VAT is used, the cost is specified
 without VAT.
 
-Maxcount
+Maximum number of uses
 : Maximum number of instances of this additional option that can be
 purchased in total.
 
index 4ebd4dec7486f04ced774033fe11bfe0236fb4ab..2e3cb1bc357a722eb1ec52249f380b35ac955c44 100644 (file)
@@ -88,7 +88,7 @@ earlier.
 Color
 :   Color to use on schedule (and other places) for this track
 
-Incfp
+In call for papers
 :   Whether this track should be available to choose in the
 [call for papers](callforpapers) submission form.
 
@@ -125,10 +125,10 @@ profile can be used across multiple conferences.
 Status
 :      The [state](callforpapers#states) state of this session.
 
-Starttime
+Start time
 :      If the session is scheduled, the starting date and time.
 
-Endtime
+End time
 :      If the session is scheduled, the ending date and time.
 
 Cross schedule
index a1eb37d52893a65229dd7e156e14d0467cc9264d..0cb9fec6136b4025f7074a510d41b8de3ee13103 100644 (file)
@@ -138,7 +138,7 @@ Urlname
 :  Name-part used in URLs for this sponsorship level (typically a
    slug-style lowercase version of the name)
 
-Levelcost
+Cost
 :  Price for this level (excluding VAT if VAT is used)
 
 Available for signup
index a6dc2986f0600a2f163c17dfdfbcd95556492645..f9271f7dbea7d22f9fa74cbf8d0c2cdbd192b8f0 100644 (file)
@@ -48,30 +48,30 @@ they can be used (e.g. the typical EARLYBIRD use).
 Code
 : This is the actual code that should be entered.
 
-Discountpercentage
+Discount percentage
 : The percent discount that this code gives. Can't be specified at
-the same time as discountamount.
+the same time as discount amount.
 
-Regonly
+Registation only
 : The percent applies only to the registration, not the full cost
 including additional options (only available if the type of
 discount code is percentage)
 
-Discountamount
+Discount amount
 : The amount of discount this code gives. Can't be specified at the
-same time as discountpercentage.
+same time as discount percentage.
 
-Validuntil
+Valid until
 : The date until which this code can be used.
 
-Maxuses
+Max uses
 : Maximum number of uses of this code.
 
-Requiresregtype
+Requires registration type
 : In order to use this discount code, one of the selected registration
 types must be used.
 
-Requiresoption
+Requires option
 : In order to use this discount code, one of the selected additional
 options have to be added to the registration.
 
index 8f0d2c56298e66ef6d8851ba7efd044665df8188..193769d32cb614c79f30cc825900eebe3841aee3 100644 (file)
@@ -73,13 +73,13 @@ class Migration(migrations.Migration):
                 ('askfood', models.BooleanField(default=True, verbose_name="Field: dietary", help_text="Include field for dietary needs")),
                 ('askshareemail', models.BooleanField(default=False, verbose_name="Field: share email", help_text="Include field for sharing email with sponsors")),
                 ('skill_levels', models.BooleanField(default=True)),
-                ('additionalintro', models.TextField(help_text=b'Additional text shown just before the list of available additional options', blank=True)),
+                ('additionalintro', models.TextField(help_text=b'Additional text shown just before the list of available additional options', blank=True, verbose_name="Additional options intro")),
                 ('basetemplate', models.CharField(default=None, max_length=128, null=True, help_text=b'Relative name to template used as base to extend any default templates from', blank=True)),
                 ('templatemodule', models.CharField(default=None, max_length=128, null=True, help_text=b"Full path to python module containing a 'templateextra.py' submodule", blank=True)),
                 ('templateoverridedir', models.CharField(default=None, max_length=128, null=True, help_text=b'Full path to a directory with override templates in', blank=True)),
                 ('badgemodule', models.CharField(default=None, max_length=128, null=True, help_text=b'Full path to python module *and class* used to render badges', blank=True)),
                 ('templatemediabase', models.CharField(default=None, max_length=128, null=True, help_text=b'Relative location to template media (must be local to avoid https/http errors)', blank=True)),
-                ('callforpapersintro', models.TextField(blank=True)),
+                ('callforpapersintro', models.TextField(blank=True, verbose_name="Call for papers intro")),
                 ('sendwelcomemail', models.BooleanField(default=False, verbose_name="Send welcome email", help_text="Send an email to attendees once their registration is completed.")),
                 ('welcomemail', models.TextField(blank=True, verbose_name="Welcome email contents")),
                 ('lastmodified', models.DateTimeField(auto_now=True)),
@@ -98,7 +98,7 @@ class Migration(migrations.Migration):
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                 ('name', models.CharField(max_length=100)),
                 ('cost', models.IntegerField()),
-                ('maxcount', models.IntegerField()),
+                ('maxcount', models.IntegerField(verbose_name="Maximum number of uses")),
                 ('public', models.BooleanField(default=True, help_text=b'Visible on public forms (opposite of admin only)')),
                 ('upsellable', models.BooleanField(default=True, help_text=b'Can this option be purchased after the registration is completed')),
                 ('invoice_autocancel_hours', models.IntegerField(blank=True, help_text=b'Automatically cancel invoices after this many hours', null=True, verbose_name=b'Autocancel invoices', validators=[django.core.validators.MinValueValidator(1)])),
@@ -191,8 +191,8 @@ class Migration(migrations.Migration):
             name='ConferenceSessionScheduleSlot',
             fields=[
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
-                ('starttime', models.DateTimeField()),
-                ('endtime', models.DateTimeField()),
+                ('starttime', models.DateTimeField(verbose_name="Start time")),
+                ('endtime', models.DateTimeField(verbose_name="End time")),
             ],
         ),
         migrations.CreateModel(
@@ -218,10 +218,10 @@ class Migration(migrations.Migration):
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                 ('code', models.CharField(max_length=100)),
                 ('discountamount', models.IntegerField(default=0)),
-                ('discountpercentage', models.IntegerField(default=0)),
-                ('regonly', models.BooleanField(default=False, help_text=b"Apply percentage discount only to the registration cost, not additional options. By default, it's applied to both.")),
-                ('validuntil', models.DateField(null=True, blank=True)),
-                ('maxuses', models.IntegerField(default=0)),
+                ('discountpercentage', models.IntegerField(default=0, verbose_name="Discount percentage")),
+                ('regonly', models.BooleanField(default=False, help_text=b"Apply percentage discount only to the registration cost, not additional options. By default, it's applied to both.", verbose_name="Registration only")),
+                ('validuntil', models.DateField(null=True, blank=True, verbose_name="Valid until")),
+                ('maxuses', models.IntegerField(default=0, verbose_name="Max uses")),
                 ('is_invoiced', models.BooleanField(default=False, verbose_name=b'Has an invoice been sent for this discount code.')),
             ],
             options={
@@ -290,19 +290,19 @@ class Migration(migrations.Migration):
             name='RegistrationType',
             fields=[
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
-                ('regtype', models.CharField(max_length=64)),
+                ('regtype', models.CharField(max_length=64, verbose_name="Registration type")),
                 ('cost', models.IntegerField()),
                 ('active', models.BooleanField(default=True)),
-                ('activeuntil', models.DateField(null=True, blank=True)),
+                ('activeuntil', models.DateField(null=True, blank=True, verbose_name="Active until")),
                 ('inlist', models.BooleanField(default=True)),
                 ('sortkey', models.IntegerField(default=10)),
                 ('specialtype', models.CharField(blank=True, max_length=5, null=True, choices=[(b'spk', b'Confirmed speaker'), (b'man', b'Manually confirmed'), (b'staff', b'Confirmed staff')])),
-                ('alertmessage', models.TextField(blank=True)),
+                ('alertmessage', models.TextField(blank=True, verbose_name="Alert message", help_text="Message shown in popup to user when completing the registration")),
                 ('upsell_target', models.BooleanField(default=False, help_text=b'Is target registration type for upselling in order to add additional options')),
                 ('invoice_autocancel_hours', models.IntegerField(blank=True, help_text=b'Automatically cancel invoices after this many hours', null=True, verbose_name=b'Autocancel invoices', validators=[django.core.validators.MinValueValidator(1)])),
                 ('conference', models.ForeignKey(to='confreg.Conference', on_delete=models.CASCADE)),
                 ('days', models.ManyToManyField(to='confreg.RegistrationDay', blank=True)),
-                ('regclass', models.ForeignKey(blank=True, to='confreg.RegistrationClass', null=True, on_delete=models.CASCADE)),
+                ('regclass', models.ForeignKey(blank=True, to='confreg.RegistrationClass', null=True, on_delete=models.CASCADE, verbose_name="Registration class")),
                 ('requires_option', models.ManyToManyField(help_text=b'Requires at least one of the selected additional options to be picked', to='confreg.ConferenceAdditionalOption', blank=True)),
             ],
             options={
@@ -324,7 +324,7 @@ class Migration(migrations.Migration):
             name='Room',
             fields=[
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
-                ('roomname', models.CharField(max_length=20)),
+                ('roomname', models.CharField(max_length=20, verbose_name="Room name")),
                 ('sortkey', models.IntegerField(default=100)),
                 ('conference', models.ForeignKey(to='confreg.Conference', on_delete=models.CASCADE)),
             ],
@@ -362,10 +362,10 @@ class Migration(migrations.Migration):
             name='Track',
             fields=[
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
-                ('trackname', models.CharField(max_length=100)),
+                ('trackname', models.CharField(max_length=100, verbose_name="Track name")),
                 ('color', models.CharField(blank=True, max_length=20, validators=[postgresqleu.confreg.models.color_validator])),
                 ('sortkey', models.IntegerField(default=100)),
-                ('incfp', models.BooleanField(default=False)),
+                ('incfp', models.BooleanField(default=False, verbose_name="In call for papers")),
                 ('conference', models.ForeignKey(to='confreg.Conference', on_delete=models.CASCADE)),
             ],
         ),
index 0b399abc91238e51eaf0c7457551d8422673b626..68e18088fd9d25a287452125c3e989ff0023c435 100644 (file)
@@ -54,7 +54,7 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='discountcode',
             name='requiresoption',
-            field=models.ManyToManyField(help_text=b'Requires this option to be set in order to be valid', to='confreg.ConferenceAdditionalOption', blank=True),
+            field=models.ManyToManyField(help_text=b'Requires this option to be set in order to be valid', to='confreg.ConferenceAdditionalOption', blank=True, verbose_name="Requires option"),
         ),
         migrations.AddField(
             model_name='discountcode',
@@ -204,7 +204,7 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='conferenceadditionaloption',
             name='requires_regtype',
-            field=models.ManyToManyField(help_text=b'Can only be picked with selected registration types', to='confreg.RegistrationType', blank=True),
+            field=models.ManyToManyField(help_text=b'Can only be picked with selected registration types', to='confreg.RegistrationType', blank=True, verbose_name="Requires registration type"),
         ),
         migrations.AddField(
             model_name='conference',
index b14f7a013f84f27ed76fd3595c61e8fa978a9439..b4e2df73ec5d752df35b9a33a1f45a35bf0cd590 100644 (file)
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
         migrations.AlterField(
             model_name='discountcode',
             name='requiresregtype',
-            field=models.ManyToManyField(help_text=b'Require a specific registration type to be valid', to='confreg.RegistrationType', blank=True),
+            field=models.ManyToManyField(help_text=b'Require a specific registration type to be valid', to='confreg.RegistrationType', blank=True, verbose_name="Requires registration type"),
         ),
     ]
index 4ac5986b9b60b0e6f216035e1cb7a63d19309b86..a80ad3258f73a31e88eb7393a52194f021eb749c 100644 (file)
@@ -30,7 +30,7 @@ class Migration(migrations.Migration):
         migrations.AlterField(
             model_name='discountcode',
             name='discountamount',
-            field=models.DecimalField(max_digits=10, decimal_places=2, default=0),
+            field=models.DecimalField(max_digits=10, decimal_places=2, default=0, verbose_name="Discount amount"),
         ),
         migrations.AlterField(
             model_name='registrationtype',
index 7f0456678ed3e3ba3d18b2d142004a8a013b37ce..2a999099f9c7d673c55200454c7973381360d933 100644 (file)
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
         migrations.AlterField(
             model_name='registrationtype',
             name='specialtype',
-            field=models.CharField(blank=True, max_length=5, null=True, choices=[(b'man', b'Manually confirmed'), (b'spk', b'Confirmed speaker'), (b'spkr', b'Confirmed or reserve speaker'), (b'staff', b'Confirmed staff')]),
+            field=models.CharField(blank=True, max_length=5, null=True, choices=[(b'man', b'Manually confirmed'), (b'spk', b'Confirmed speaker'), (b'spkr', b'Confirmed or reserve speaker'), (b'staff', b'Confirmed staff')], verbose_name="Special type"),
         ),
     ]
index ff6cabd8699ee4d34f5c117c697660965990e661..0f9031a0a0f48265ac013d1f7e3b889f5efc11e8 100644 (file)
@@ -142,9 +142,9 @@ class Conference(models.Model):
        askshareemail = models.BooleanField(null=False, blank=False, default=False, verbose_name="Field: share email", help_text="Include field for sharing email with sponsors")
        askphotoconsent = models.BooleanField(null=False, blank=False, default=True, verbose_name="Field: photo consent", help_text="Include field for getting photo consent")
        skill_levels = models.BooleanField(blank=False, null=False, default=True)
-       additionalintro = models.TextField(blank=True, null=False, help_text="Additional text shown just before the list of available additional options")
+       additionalintro = models.TextField(blank=True, null=False, verbose_name="Additional options intro", help_text="Additional text shown just before the list of available additional options")
        jinjadir = models.CharField(max_length=200, blank=True, null=True, default=None, help_text="Full path to new style jinja repository root", verbose_name="Jinja directory")
-       callforpapersintro = models.TextField(blank=True, null=False)
+       callforpapersintro = models.TextField(blank=True, null=False, verbose_name="Call for papers intro")
 
        sendwelcomemail = models.BooleanField(blank=False, null=False, default=False, verbose_name="Send welcome email", help_text="Send an email to attendees once their registration is completed.")
        welcomemail = models.TextField(blank=True, null=False, verbose_name="Welcome email contents")
@@ -289,17 +289,17 @@ class RegistrationDay(models.Model):
 
 class RegistrationType(models.Model):
        conference = models.ForeignKey(Conference, null=False, on_delete=models.CASCADE)
-       regtype = models.CharField(max_length=64, null=False, blank=False)
-       regclass = models.ForeignKey(RegistrationClass, null=True, blank=True, on_delete=models.CASCADE)
+       regtype = models.CharField(max_length=64, null=False, blank=False, verbose_name="Registration type")
+       regclass = models.ForeignKey(RegistrationClass, null=True, blank=True, on_delete=models.CASCADE, verbose_name="Registration class")
        cost = models.DecimalField(decimal_places=2, max_digits=10, null=False, default=0, help_text="Cost excluding VAT.")
        active = models.BooleanField(null=False, blank=False, default=True)
-       activeuntil = models.DateField(null=True, blank=True)
+       activeuntil = models.DateField(null=True, blank=True, verbose_name="Active until")
        inlist = models.BooleanField(null=False, blank=False, default=True)
        sortkey = models.IntegerField(null=False, blank=False, default=10)
-       specialtype = models.CharField(max_length=5, blank=True, null=True, choices=special_reg_types)
+       specialtype = models.CharField(max_length=5, blank=True, null=True, choices=special_reg_types, verbose_name="Special type")
        require_phone = models.BooleanField(null=False, blank=False, default=False, help_text="Require phone number to be entered")
        days = models.ManyToManyField(RegistrationDay, blank=True)
-       alertmessage =models.TextField(null=False, blank=True)
+       alertmessage =models.TextField(null=False, blank=True, verbose_name="Alert message", help_text="Message shown in popup to user when completing the registration")
        upsell_target = models.BooleanField(null=False, blank=False, default=False, help_text='Is target registration type for upselling in order to add additional options')
        invoice_autocancel_hours = models.IntegerField(blank=True, null=True, validators=[MinValueValidator(1),], verbose_name="Autocancel invoices", help_text="Automatically cancel invoices after this many hours")
        requires_option = models.ManyToManyField('ConferenceAdditionalOption', blank=True, help_text='Requires at least one of the selected additional options to be picked')
@@ -350,11 +350,11 @@ class ConferenceAdditionalOption(models.Model):
        conference = models.ForeignKey(Conference, null=False, blank=False, on_delete=models.CASCADE)
        name = models.CharField(max_length=100, null=False, blank=False)
        cost = models.DecimalField(decimal_places=2, max_digits=10, null=False, default=0, help_text="Cost excluding VAT.")
-       maxcount = models.IntegerField(null=False)
+       maxcount = models.IntegerField(null=False, verbose_name="Maximum number of uses")
        public = models.BooleanField(null=False, blank=False, default=True, help_text='Visible on public forms (opposite of admin only)')
        upsellable = models.BooleanField(null=False, blank=False, default=True, help_text='Can this option be purchased after the registration is completed')
        invoice_autocancel_hours = models.IntegerField(blank=True, null=True, validators=[MinValueValidator(1),], verbose_name="Autocancel invoices", help_text="Automatically cancel invoices after this many hours")
-       requires_regtype = models.ManyToManyField(RegistrationType, blank=True, help_text='Can only be picked with selected registration types')
+       requires_regtype = models.ManyToManyField(RegistrationType, blank=True, verbose_name="Requires registration type", help_text='Can only be picked with selected registration types')
        mutually_exclusive = models.ManyToManyField('self', blank=True, help_text='Mutually exlusive with these additional options', symmetrical=True)
 
        class Meta:
@@ -565,10 +565,10 @@ class RegistrationWaitlistHistory(models.Model):
 
 class Track(models.Model):
        conference = models.ForeignKey(Conference, null=False, blank=False, on_delete=models.CASCADE)
-       trackname = models.CharField(max_length=100, null=False, blank=False)
+       trackname = models.CharField(max_length=100, null=False, blank=False, verbose_name="Track name")
        color = models.CharField(max_length=20, null=False, blank=True, validators=[color_validator, ])
        sortkey = models.IntegerField(null=False, default=100, blank=False)
-       incfp = models.BooleanField(null=False, default=False, blank=False)
+       incfp = models.BooleanField(null=False, default=False, blank=False, verbose_name="In call for papers")
 
        json_included_attributes = ['trackname', 'color', 'sortkey', 'incfp']
 
@@ -577,7 +577,7 @@ class Track(models.Model):
 
 class Room(models.Model):
        conference = models.ForeignKey(Conference, null=False, blank=False, on_delete=models.CASCADE)
-       roomname = models.CharField(max_length=20, null=False, blank=False)
+       roomname = models.CharField(max_length=20, null=False, blank=False, verbose_name="Room name")
        sortkey = models.IntegerField(null=False, blank=False, default=100)
 
        json_included_attributes = ['roomname', 'sortkey']
@@ -650,8 +650,8 @@ class Speaker_Photo(models.Model):
 
 class ConferenceSessionScheduleSlot(models.Model):
        conference = models.ForeignKey(Conference, null=False, blank=False, on_delete=models.CASCADE)
-       starttime = models.DateTimeField(null=False, blank=False)
-       endtime = models.DateTimeField(null=False, blank=False)
+       starttime = models.DateTimeField(null=False, blank=False, verbose_name="Start time")
+       endtime = models.DateTimeField(null=False, blank=False, verbose_name="End time")
 
        def __unicode__(self):
                return "%s - %s" % (self.starttime, self.endtime)
@@ -872,13 +872,13 @@ class PrepaidVoucher(models.Model):
 class DiscountCode(models.Model):
        conference = models.ForeignKey(Conference, null=False, blank=False, on_delete=models.CASCADE)
        code = models.CharField(max_length=100, null=False, blank=False)
-       discountamount = models.DecimalField(decimal_places=2, max_digits=10, null=False, default=0)
-       discountpercentage = models.IntegerField(null=False, blank=False, default=0)
-       regonly = models.BooleanField(null=False, blank=False, default=False, help_text="Apply percentage discount only to the registration cost, not additional options. By default, it's applied to both.")
-       validuntil = models.DateField(blank=True, null=True)
-       maxuses = models.IntegerField(null=False, blank=False, default=0)
-       requiresoption = models.ManyToManyField(ConferenceAdditionalOption, blank=True, help_text='Requires this option to be set in order to be valid')
-       requiresregtype = models.ManyToManyField(RegistrationType, blank=True, help_text='Require a specific registration type to be valid')
+       discountamount = models.DecimalField(decimal_places=2, max_digits=10, null=False, default=0, verbose_name="Discount amount")
+       discountpercentage = models.IntegerField(null=False, blank=False, default=0, verbose_name="Discount percentage")
+       regonly = models.BooleanField(null=False, blank=False, default=False, verbose_name="Registration only", help_text="Apply percentage discount only to the registration cost, not additional options. By default, it's applied to both.")
+       validuntil = models.DateField(blank=True, null=True, verbose_name="Valid until")
+       maxuses = models.IntegerField(null=False, blank=False, default=0, verbose_name="Max uses")
+       requiresoption = models.ManyToManyField(ConferenceAdditionalOption, blank=True, verbose_name="Requires option", help_text='Requires this option to be set in order to be valid')
+       requiresregtype = models.ManyToManyField(RegistrationType, blank=True, verbose_name="Requires registration type", help_text='Require a specific registration type to be valid')
 
        registrations = models.ManyToManyField(ConferenceRegistration, blank=True)
 
index 6615db87bbbe55c7940ab6053f6c89ace36a8777..bb9581283f711d707c8193e9dd7b1985e2dd7a81 100644 (file)
@@ -92,7 +92,7 @@ class Migration(migrations.Migration):
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                 ('levelname', models.CharField(max_length=100)),
                 ('urlname', models.CharField(max_length=100, validators=[postgresqleu.util.validators.validate_lowercase])),
-                ('levelcost', models.IntegerField()),
+                ('levelcost', models.IntegerField(verbose_name="Cost")),
                 ('available', models.BooleanField(default=True, verbose_name=b'Available for signup')),
                 ('instantbuy', models.BooleanField(default=False, verbose_name="Instant buy available")),
                 ('canbuyvoucher', models.BooleanField(default=True, verbose_name="Can buy vouchers")),
index da9199b27dacba4a465e0154bf07543c9c4e9fee..743bc753e6010ef96c549c63cec3fac428057475 100644 (file)
@@ -45,7 +45,7 @@ class SponsorshipLevel(models.Model):
        conference = models.ForeignKey(Conference, null=False, blank=False, on_delete=models.CASCADE)
        levelname = models.CharField(max_length=100, null=False, blank=False)
        urlname = models.CharField(max_length=100, null=False, blank=False, validators=[validate_lowercase,])
-       levelcost = models.IntegerField(null=False, blank=False)
+       levelcost = models.IntegerField(null=False, blank=False, verbose_name="Cost")
        available = models.BooleanField(null=False, blank=False, default=True, verbose_name="Available for signup")
        maxnumber = models.IntegerField(null=False, blank=False, default=0, verbose_name="Maximum number of sponsors")
        instantbuy = models.BooleanField(null=False, blank=False, default=False, verbose_name="Instant buy available")