Moved all tests for sample_management into tests.py as that is recommended and you can do ./manage.py test <name> that way. Making tests for sample_uploader..in progress
Merge branch 'master' into dev
No longer need test directory
CollectionDate needs to be DateTime as imported dates will likely be datetimes
Really close to finishing the test suite for the excel import functions. Stuck on a transaction bug. Will have to then fix up templates and write more tests for that stuff
ExcelImportTests seem solid
More tests and change the way update_object works
Now relies on another function to check equality between excel row and database object's values
A few additional tests for ExcelImportTests just to make sure
Forgot to test the big actual spreadsheet
Uploader portion should be working. It is tested. Next is the upload_results page and view
I think the uploader is done. It is not super pretty, but looks to be working
Lots of stuff broken. Need to be able to exclude fields from validation through parameter in update_object
Almost there. The fields with Default values need some love. If the field is detected to have a default value and the value given is a NoneType value it should be forced into the default value for that field instead of throwing a validation error.
update_object now checks to see if the incoming value for a field is a NoneType value aka '' or None...
If it is a nonetype it will attempt to use a default value if the field has that attribute set otherwise the normal
validation error will be raised
DateRecieved must be present now. No longer has a default value.
Forgot to save before committing
SampleTemplateWriter is a class that will handle writing the template files. So far writes all fields from Sample and Subject to first row in a sheet specified by a variable in the class. Any required fields(Field.null == False) will be marked by a bold font. TODO: Place description in a row below the header row that contains the description of the field and [Default:Field.default] if the field has a default value
Sample upload template file now contains description field. Also added management command to generate the template file in the STATIC_ROOT location. Modified settings.example