mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
Add default BooleanField(default=False) for django 1.7 compatibility
This commit is contained in:
parent
d3b42a125d
commit
174c475ec7
@ -136,7 +136,7 @@ def getTripForm(expedition):
|
||||
names = ["-----"] + names
|
||||
name = forms.ChoiceField([(n, n) for n in names])
|
||||
TU = forms.FloatField(required=False)
|
||||
author = forms.BooleanField(required=False)
|
||||
author = forms.BooleanField(required=False, default=False)
|
||||
|
||||
PersonTripFormSet = formset_factory(PersonTripForm, extra=1)
|
||||
|
||||
|
@ -125,7 +125,7 @@ class ExpeditionDay(TroggleModel):
|
||||
class Person(TroggleModel):
|
||||
first_name = models.CharField(max_length=100)
|
||||
last_name = models.CharField(max_length=100)
|
||||
is_vfho = models.BooleanField(help_text="VFHO is the Vereines für Höhlenkunde in Obersteier, a nearby Austrian caving club.")
|
||||
is_vfho = models.BooleanField(help_text="VFHO is the Vereines für Höhlenkunde in Obersteier, a nearby Austrian caving club.", default=False)
|
||||
mug_shot = models.CharField(max_length=100, blank=True,null=True)
|
||||
blurb = models.TextField(blank=True,null=True)
|
||||
|
||||
@ -134,7 +134,7 @@ class Person(TroggleModel):
|
||||
|
||||
#the below have been removed and made methods. I'm not sure what the b in bisnotable stands for. - AC 16 Feb
|
||||
#notability = models.FloatField() # for listing the top 20 people
|
||||
#bisnotable = models.BooleanField()
|
||||
#bisnotable = models.BooleanField(default=False)
|
||||
user = models.OneToOneField(User, null=True, blank=True)
|
||||
def get_absolute_url(self):
|
||||
return urlparse.urljoin(settings.URL_ROOT,reverse('person',kwargs={'first_name':self.first_name,'last_name':self.last_name}))
|
||||
@ -312,7 +312,7 @@ class PersonTrip(TroggleModel):
|
||||
#date = models.DateField() #MJG wants to KILL THIS (redundant information)
|
||||
time_underground = models.FloatField(help_text="In decimal hours")
|
||||
logbook_entry = models.ForeignKey(LogbookEntry)
|
||||
is_logbook_entry_author = models.BooleanField()
|
||||
is_logbook_entry_author = models.BooleanField(default=False)
|
||||
|
||||
|
||||
# sequencing by person (difficult to solve locally)
|
||||
@ -371,7 +371,7 @@ class CaveAndEntrance(models.Model):
|
||||
class CaveSlug(models.Model):
|
||||
cave = models.ForeignKey('Cave')
|
||||
slug = models.SlugField(max_length=50, unique = True)
|
||||
primary = models.BooleanField()
|
||||
primary = models.BooleanField(default=False)
|
||||
|
||||
|
||||
class Cave(TroggleModel):
|
||||
@ -546,7 +546,7 @@ class OtherCaveName(TroggleModel):
|
||||
class EntranceSlug(models.Model):
|
||||
entrance = models.ForeignKey('Entrance')
|
||||
slug = models.SlugField(max_length=50, unique = True)
|
||||
primary = models.BooleanField()
|
||||
primary = models.BooleanField(default=False)
|
||||
|
||||
class Entrance(TroggleModel):
|
||||
name = models.CharField(max_length=100, blank=True,null=True)
|
||||
|
@ -213,7 +213,7 @@ class SurvexScanSingle(models.Model):
|
||||
class TunnelFile(models.Model):
|
||||
tunnelpath = models.CharField(max_length=200)
|
||||
tunnelname = models.CharField(max_length=200)
|
||||
bfontcolours = models.BooleanField()
|
||||
bfontcolours = models.BooleanField(default=False)
|
||||
survexscansfolders = models.ManyToManyField("SurvexScansFolder")
|
||||
survexscans = models.ManyToManyField("SurvexScanSingle")
|
||||
survexblocks = models.ManyToManyField("SurvexBlock")
|
||||
|
Loading…
Reference in New Issue
Block a user