vintasoftware / django-knowledge-share

The engine behind Vinta's Lessons Learned page.
https://vintasoftware.com/lessons-learned/
MIT License
37 stars 1 forks source link

Added timezone awareness option when saving the MicroBlogPost model. #12

Closed lucabezerra closed 7 years ago

lucabezerra commented 7 years ago

Also updated .gitignore and merged all requirement files into a single test_requirements.txt.

Description

When running the tests for Vinta Site, a series of warnings were being thrown, regarding naive vs aware timezones. A fix in the save method of the MicroBlogPost model now allows a client using this lib to pass a 'timezone' key-value argument to the save method of this model which has the timezone string as its value (e.g. 'America/Sao_Paulo').

Motivation and Context

Issue: https://github.com/vintasoftware/vinta-site/issues/167

Types of changes

Checklist:

codecov-io commented 7 years ago

Codecov Report

Merging #12 into master will decrease coverage by 1.13%. The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
- Coverage   95.37%   94.23%   -1.14%     
==========================================
  Files          10       10              
  Lines         238      243       +5     
  Branches       13       14       +1     
==========================================
+ Hits          227      229       +2     
- Misses         11       13       +2     
- Partials        0        1       +1
Impacted Files Coverage Δ
knowledge_share/models.py 94% <50%> (-6%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 65cae87...6e08214. Read the comment docs.