forked from sgrid/pysgrid
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sgrid#57 from axiom-data-science/defaults
Global defaults, passing back 'id' though REST interface, bug fixes Former-commit-id: 5446d3b
- Loading branch information
Showing
20 changed files
with
1,101 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wms', '0028_auto_20150710_1637'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Variable', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('std_name', models.CharField(help_text=b"The 'standard_name' of this variable", max_length=200)), | ||
('units', models.CharField(help_text=b"The 'units' of this variable", max_length=200, blank=True)), | ||
('logscale', models.BooleanField(default=False, help_text=b'If this variable should default to a log scale')), | ||
('default_min', models.FloatField(default=None, help_text=b'If no colorscalerange is specified, this is used for the min. If None, autoscale is used.', null=True, blank=True)), | ||
('default_max', models.FloatField(default=None, help_text=b'If no colorscalerange is specified, this is used for the max. If None, autoscale is used.', null=True, blank=True)), | ||
], | ||
options={ | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='variable', | ||
unique_together=set([('std_name', 'units')]), | ||
), | ||
migrations.AddField( | ||
model_name='layer', | ||
name='logscale', | ||
field=models.NullBooleanField(default=None, help_text=b'If this dataset variable should default to a log scale'), | ||
preserve_default=True, | ||
), | ||
migrations.AddField( | ||
model_name='virtuallayer', | ||
name='logscale', | ||
field=models.NullBooleanField(default=None, help_text=b'If this dataset variable should default to a log scale'), | ||
preserve_default=True, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wms', '0029_auto_20150716_1639'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='variable', | ||
name='logscale', | ||
field=models.NullBooleanField(default=None, help_text=b'If this variable should default to a log scale'), | ||
preserve_default=True, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.db import models | ||
|
||
|
||
class Variable(models.Model): | ||
std_name = models.CharField(max_length=200, help_text="The 'standard_name' of this variable") | ||
units = models.CharField(max_length=200, blank=True, help_text="The 'units' of this variable") | ||
logscale = models.NullBooleanField(default=None, null=True, help_text="If this variable should default to a log scale") | ||
default_min = models.FloatField(null=True, default=None, blank=True, help_text="If no colorscalerange is specified, this is used for the min. If None, autoscale is used.") | ||
default_max = models.FloatField(null=True, default=None, blank=True, help_text="If no colorscalerange is specified, this is used for the max. If None, autoscale is used.") | ||
|
||
class Meta: | ||
unique_together = ('std_name', 'units',) | ||
|
||
def __unicode__(self): | ||
return '{}_{}'.format(self.std_name, self.units) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.