comparison apps/bundle/models.py @ 184:b711f0087709

Use DESCRIPTION file for bundles (SCHEMA CHANGE) * Added two new fields to the Bundle model: * octave_format, which allows users to specify if their bundle has been formatted according to octave packaging standards or not * description_file, which points to a file named DESCRIPTION in the root directory (or the next top-level directory), if the octave_format checkbox is ticked and if one exists * Fixed the uploader field for form by making it a hidden input and preventing hidden inputs from showing up entirely
author dellsystem <ilostwaldo@gmail.com>
date Sat, 27 Oct 2012 15:58:08 -0400
parents 86129d185ddb
children 4752861906b3
comparison
equal deleted inserted replaced
183:cdcbfaa65cfe 184:b711f0087709
20 name = models.SlugField(help_text=_("Your bundle will be accessible " + 20 name = models.SlugField(help_text=_("Your bundle will be accessible " +
21 "from a URL that uses the name you enter here, so choose wisely. " + 21 "from a URL that uses the name you enter here, so choose wisely. " +
22 "Acceptable characters: alphanumeric characters, hyphens, and " + 22 "Acceptable characters: alphanumeric characters, hyphens, and " +
23 "underscores.")) 23 "underscores."))
24 uploader = models.ForeignKey(User) 24 uploader = models.ForeignKey(User)
25 description = models.TextField(max_length=32728, blank=True, null=True) 25 description = models.TextField(blank=True, null=True)
26 octave_format = models.BooleanField('Is the bundle formatted according'
27 ' to Octave package manager standards?', default=False)
28 # If octave_format is true and there is a DESCRIPTION file in the root
29 description_file = models.ForeignKey('BundleFile', blank=True, null=True,
30 related_name="described")
26 free_license = models.ForeignKey(FreeLicense, default=1) 31 free_license = models.ForeignKey(FreeLicense, default=1)
27 pub_date = models.DateTimeField('date uploaded', auto_now_add=True) 32 pub_date = models.DateTimeField('date uploaded', auto_now_add=True)
28 mod_date = models.DateTimeField('date last modified', auto_now=True) 33 mod_date = models.DateTimeField('date last modified', auto_now=True)
29 done_uploading = models.BooleanField(default=False) 34 done_uploading = models.BooleanField(default=False)
30 file_name = models.CharField(max_length=256) # the uploaded file 35 file_name = models.CharField(max_length=256) # the uploaded file