bradmontgomery / django-redis-metrics

Metrics for django apps backed by Redis.
http://django-redis-metrics.readthedocs.io
MIT License
93 stars 24 forks source link

font file for font-awesome missing #57

Closed phoebebright closed 7 years ago

phoebebright commented 7 years ago

I'm doing some postprocessing as part of collectstatic and get this error:

Post-processing 'font-awesome/css/font-awesome.css' failed!

Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/Users/pbright/.virtualenvs/board/lib/python2.7/site-packages/django/core/management/init.py", line 367, in execute_from_command_line utility.execute() File "/Users/pbright/.virtualenvs/board/lib/python2.7/site-packages/django/core/management/init.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/pbright/.virtualenvs/board/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv self.execute(*args, *cmd_options) File "/Users/pbright/.virtualenvs/board/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute output = self.handle(args, **options) File "/Users/pbright/.virtualenvs/board/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 193, in handle collected = self.collect() File "/Users/pbright/.virtualenvs/board/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 145, in collect raise processed ValueError: The file 'font-awesome/css/../fonts/fontawesome-webfont.eot' could not be found with <django.contrib.staticfiles.storage.ManifestStaticFilesStorage object at 0x1161c7f90>. Exception TypeError: "'NoneType' object is not callable" in <bound method Connection.del of <neo4j.v1.connection.Connection object at 0x1122977d0>> ignored

Traced it back to there being no font folder in static.

How about using CDN for fontawesome to avoid this problem?

phoebebright commented 7 years ago

Not sure why it can't find the font file when it is in the repo. Tried a forked version with CDN and removed font-awesome directory from static and processes static files correctly now.

bradmontgomery commented 7 years ago

Yeah, this seems strange. I'd like to try to replicate this issue to see if I can figure out why this happened, but a CDN-hosted copy of those files (maybe all the static assets for this app?) seems like it may be a good option anyway. Thanks for reporting.

bradmontgomery commented 7 years ago

I bet this has something to do with not including font files in the MANIFEST: https://github.com/bradmontgomery/django-redis-metrics/blob/master/MANIFEST.in#L2

phoebebright commented 7 years ago

That could be. Forked version with cdn here: https://github.com/phoebebright/django-redis-metrics can do a pull request if that helps.

bradmontgomery commented 7 years ago

@phoebebright go ahead and send me a pull request. I could possibly do a release today w/ that, and come back to figure the rest out later.

phoebebright commented 7 years ago

Done

bradmontgomery commented 7 years ago

Since #58 technically fixes this issue, I'm inclined to close this issue for a few reasons:

  1. Font-awesome is not required for the basic set of features in this app.
  2. If someone wanted to manage their own static assets, you'd typically do that at the project level, and share those among installed apps.
  3. You'd likely do ☝️ this if you were customizing templates for redis_metrics.

Given all that, I don't think it makes too much sense to bundle them. Thanks again for your help @phoebebright!