make script popup form work
This commit is contained in:
parent
e681cd61ec
commit
48acee9d45
|
@ -37,7 +37,8 @@ class PopupForm(ItfForm):
|
||||||
'''
|
'''
|
||||||
All popup forms inherit from this
|
All popup forms inherit from this
|
||||||
'''
|
'''
|
||||||
pass
|
def save(self, commit=True, request=None):
|
||||||
|
return super(PopupForm, self).save(commit=commit)
|
||||||
|
|
||||||
class AutocompleteAddWidget(forms.Select):
|
class AutocompleteAddWidget(forms.Select):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -34,17 +34,17 @@ class Script(ItfModel):
|
||||||
no_of_women = models.IntegerField(blank=True, null=True, help_text="How many characters are women?")
|
no_of_women = models.IntegerField(blank=True, null=True, help_text="How many characters are women?")
|
||||||
tags = TagField(blank=True, help_text="Enter as many tags as you like, separated by commas")
|
tags = TagField(blank=True, help_text="Enter as many tags as you like, separated by commas")
|
||||||
production_notes = models.TextField(blank=True, help_text="Additional production notes")
|
production_notes = models.TextField(blank=True, help_text="Additional production notes")
|
||||||
language = models.CharField(max_length=32, choices=LANGUAGE_CHOICES)
|
language = models.CharField(max_length=32, choices=LANGUAGE_CHOICES, blank=True, null=True)
|
||||||
approx_duration = models.IntegerField(blank=True, null=True, verbose_name="Approximate duration", help_text="Approximate time, in minutes")
|
approx_duration = models.IntegerField(blank=True, null=True, verbose_name="Approximate duration", help_text="Approximate time, in minutes")
|
||||||
author = models.CharField(max_length=255, help_text="Name of the author of the play")
|
author = models.CharField(max_length=255, help_text="Name of the author of the play")
|
||||||
contact = models.EmailField()
|
contact = models.EmailField(blank=True, null=True)
|
||||||
script = models.FileField(null=True, upload_to='upload/scripts/')
|
script = models.FileField(null=True, upload_to='upload/scripts/')
|
||||||
is_partial = models.BooleanField(default=False, verbose_name="Is this a partial script upload?", help_text="Check this if you are uploading only a partial script")
|
is_partial = models.BooleanField(default=False, verbose_name="Is this a partial script upload?", help_text="Check this if you are uploading only a partial script")
|
||||||
license_adapt = models.ForeignKey("License", related_name="adaptation_license", verbose_name="Adaptation License", help_text="License for adaptation rights")
|
license_adapt = models.ForeignKey("License", related_name="adaptation_license", verbose_name="Adaptation License", help_text="License for adaptation rights", blank=True, null=True)
|
||||||
license_perform = models.ForeignKey("License", related_name="performance_license", verbose_name="Performance License", help_text="License for performance rights")
|
license_perform = models.ForeignKey("License", related_name="performance_license", verbose_name="Performance License", help_text="License for performance rights", blank=True, null=True)
|
||||||
fts_fields = ['title', 'synopsis', 'author']
|
fts_fields = ['title', 'synopsis', 'author']
|
||||||
fk_fields = ['license_adapt', 'license_perform']
|
fk_fields = ['license_adapt', 'license_perform']
|
||||||
theatre_group = models.ForeignKey(TheatreGroup, help_text="Theatre Group, if any")
|
theatre_group = models.ForeignKey(TheatreGroup, help_text="Theatre Group, if any", blank=True, null=True)
|
||||||
related_scripts = models.ManyToManyField("Script", through="ScriptScript", related_name='related_script')
|
related_scripts = models.ManyToManyField("Script", through="ScriptScript", related_name='related_script')
|
||||||
galleries = generic.GenericRelation(GalleryAlbum)
|
galleries = generic.GenericRelation(GalleryAlbum)
|
||||||
notes = generic.GenericRelation(Note)
|
notes = generic.GenericRelation(Note)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user