bartTC / django-attachments

A generic Django application to attach Files (Attachments) to any model.
BSD 3-Clause "New" or "Revised" License
296 stars 90 forks source link

Add new template tag attachments_count #42

Closed atodorov closed 6 years ago

atodorov commented 6 years ago

I have migrated a large application to django-attachments and there are only a few things that I'm missing. The first is an easy way to count how many attachments are there for a given object. We use this very heavily in templates and this tag will solve the issue.

codecov-io commented 6 years ago

Codecov Report

Merging #42 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #42   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines          87     89    +2     
  Branches        6      6           
=====================================
+ Hits           87     89    +2
Impacted Files Coverage Δ
attachments/templatetags/attachments_tags.py 100% <100%> (ø) :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 3dffb8d...5d55ee6. Read the comment docs.

bartTC commented 6 years ago

This looks valid to me. Thanks for the comprehensive integration with docs and tests.