This repository has been archived by the owner on Dec 8, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
203 additions
and
41 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
[{"pk": 1, "fields": {"name": "dod_proposal_info", "validation": ""}, "model": "sbirez.workflow"}, {"pk": 1, "fields": {"parent": 1, "validation_msg": "Must not exceed 150,000", "ask_if": "", "name": "proposed_cost", "required": false, "human": "", "subworkflow": null, "validation": "int(self) <= 150000", "help": "", "default": "", "data_type": "int", "order": 1}, "model": "sbirez.question"}, {"pk": 2, "fields": {"parent": 1, "validation_msg": "Must not exceed 9 months", "ask_if": "", "name": "duration", "required": false, "human": "", "subworkflow": null, "validation": "", "help": "", "default": "", "data_type": "str", "order": 2}, "model": "sbirez.question"}, {"pk": 3, "fields": {"parent": 1, "validation_msg": "", "ask_if": "", "name": "dta_yn", "required": true, "human": "Does the proposed cost include Discretionary Technical Assistance (DTA?)", "subworkflow": null, "validation": "", "help": "", "default": "False", "data_type": "bool", "order": 3}, "model": "sbirez.question"}, {"pk": 4, "fields": {"parent": 1, "validation_msg": "", "ask_if": "dta_yn", "name": "dta_amount", "required": true, "human": "Proposed DTA amount", "subworkflow": null, "validation": "", "help": "", "default": "0", "data_type": "int", "order": 4}, "model": "sbirez.question"}, {"pk": 5, "fields": {"parent": 1, "validation_msg": "", "ask_if": "dta_yn", "name": "dta_amount", "required": true, "human": "Proposed DTA amount", "subworkflow": null, "validation": "", "help": "", "default": "0", "data_type": "int", "order": 4}, "model": "sbirez.question"}, {"pk": 6, "fields": {"parent": 1, "validation_msg": "", "ask_if": "dta_yn", "name": "proprietary_page_numbers", "required": false, "human": "Proposed DTA amount", "subworkflow": null, "validation": "", "help": "", "default": "", "data_type": "str", "order": 5}, "model": "sbirez.question"}, {"pk": 7, "fields": {"parent": 1, "validation_msg": "", "ask_if": "", "name": "essentially_equivalent_work", "required": false, "human": "Agency name(s) and topic number for essentially equivalent work", "subworkflow": null, "validation": "", "help": "", "default": "", "data_type": "str", "order": 6}, "model": "sbirez.question"}, {"pk": 8, "fields": {"parent": 1, "validation_msg": "", "ask_if": "essentially_equivalent_work", "name": "essentially_equivalent_contract_awarded", "required": false, "human": "Contract number awarded for essentially equivalent work", "subworkflow": null, "validation": "", "help": "", "default": "", "data_type": "str", "order": 7}, "model": "sbirez.question"}] | ||
[{"model": "sbirez.workflow", "fields": {"validation": "", "name": "dod_proposal_info"}, "pk": 1}, {"model": "sbirez.workflow", "fields": {"validation": "", "name": "quest"}, "pk": 2}, {"model": "sbirez.workflow", "fields": {"validation": "", "name": "subquest"}, "pk": 3}, {"model": "sbirez.question", "fields": {"data_type": "int", "validation_msg": "Must not exceed 150,000", "parent": 1, "validation": "lte 150000; gte 0", "name": "proposed_cost", "subworkflow": null, "human": "", "default": "", "required": false, "order": 1, "ask_if": "", "help": ""}, "pk": 1}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": "Must not exceed 9 months", "parent": 1, "validation": "lte 9 months; gte 0 months", "name": "duration", "subworkflow": null, "human": "", "default": "", "required": false, "order": 2, "ask_if": "", "help": ""}, "pk": 2}, {"model": "sbirez.question", "fields": {"data_type": "int", "validation_msg": "", "parent": 1, "validation": "gte 0", "name": "dta_amount", "subworkflow": null, "human": "Proposed DTA amount", "default": "0", "required": true, "order": 4, "ask_if": "dta_yn", "help": ""}, "pk": 4}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": "", "parent": 1, "validation": "", "name": "proprietary_page_numbers", "subworkflow": null, "human": "Proposed DTA amount", "default": "", "required": false, "order": 5, "ask_if": "dta_yn", "help": ""}, "pk": 6}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": "", "parent": 1, "validation": "", "name": "essentially_equivalent_work", "subworkflow": null, "human": "Agency name(s) and topic number for essentially equivalent work", "default": "", "required": false, "order": 6, "ask_if": "", "help": ""}, "pk": 7}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": "", "parent": 1, "validation": "", "name": "essentially_equivalent_contract_awarded", "subworkflow": null, "human": "Contract number awarded for essentially equivalent work", "default": "", "required": false, "order": 7, "ask_if": "essentially_equivalent_work", "help": ""}, "pk": 8}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": "Prithee speak thy name", "parent": 2, "validation": "", "name": "quest_thy_name", "subworkflow": null, "human": "What is your name?", "default": "", "required": true, "order": 1, "ask_if": "", "help": "'Thy moniker'"}, "pk": 10}, {"model": "sbirez.question", "fields": {"data_type": "workflow", "validation_msg": null, "parent": 2, "validation": null, "name": "quest_subflow", "subworkflow": 3, "human": null, "default": null, "required": true, "order": 2, "ask_if": null, "help": null}, "pk": 11}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": null, "parent": 3, "validation": null, "name": "quest_thy_quest", "subworkflow": null, "human": "What is thy quest?", "default": null, "required": false, "order": 1, "ask_if": null, "help": "'That which thou seekest'"}, "pk": 12}, {"model": "sbirez.question", "fields": {"data_type": "str", "validation_msg": "Lancelot already said blue", "parent": 3, "validation": "does_not_equal blue", "name": "quest_thy_favorite_color", "subworkflow": null, "human": "What is thy favority color?", "default": null, "required": true, "order": 2, "ask_if": null, "help": "preferred band in the electromagnetic spectrum"}, "pk": 13}] |
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,69 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import djorm_pgfulltext.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sbirez', '0013_auto_20150317_1907'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='proposal', | ||
name='data', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='ask_if', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='data_type', | ||
field=models.TextField(null=True, default='str'), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='default', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='help', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='human', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='required', | ||
field=models.NullBooleanField(default=False), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='validation', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='validation_msg', | ||
field=models.TextField(null=True, blank=True), | ||
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
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,15 @@ | ||
from dateutil.parser import parse | ||
|
||
def no_more_than(data, field, limit, units=None): | ||
"""`field` Less Than or Equal to `limit`""" | ||
return float(field) <= limit | ||
|
||
def no_less_than(data, field, limit, units=None): | ||
"""`field` Less Than or Equal to `limit`""" | ||
return float(field) <= limit | ||
|
||
def does_not_equal(data, field, target): | ||
return field.strip().lower() != target.strip().lower() | ||
|
||
lte = no_more_than | ||
gte = no_less_than |