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

Support twitter new char limit #16

Closed chocoelho closed 6 years ago

chocoelho commented 6 years ago

Twitter has increased its character limit to 280 chars per tweet. This PR adds support for it and resolves #15.

codecov-io commented 6 years ago

Codecov Report

Merging #16 into master will increase coverage by 0.07%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #16      +/-   ##
=========================================
+ Coverage   94.23%   94.3%   +0.07%     
=========================================
  Files          10      10              
  Lines         243     246       +3     
  Branches       14      14              
=========================================
+ Hits          229     232       +3     
  Misses         13      13              
  Partials        1       1
Impacted Files Coverage Δ
knowledge_share/twitter_helpers.py 100% <100%> (ø) :arrow_up:
knowledge_share/models.py 94.33% <100%> (+0.33%) :arrow_up:

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 0c345ed...5072764. Read the comment docs.

filipeximenes commented 6 years ago

Hey, how about making the char limit a settings variable? This would make the package more flexible. Also, there should be information about this in the README

chocoelho commented 6 years ago

I'm with you on this one @filipeximenes.

chocoelho commented 6 years ago

In this case, shouldn't both TWITTER_MAX_CHARACTER and TWITTER_URL_SHORTENER_SIZE be env variables @filipeximenes?

chocoelho commented 6 years ago

Or better yet, make use of @lucabezerra PR?

filipeximenes commented 6 years ago

Yes, let's move both to the settings. Let's keep the automatic integration in a separate PR

fjsj commented 6 years ago

I'll merge this anyway and create an issue for those improvements.