Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. {% load staticfiles %}
  2. <img src="{% static "articles/css/base.css" %}" alt="My image"/>
  3.  
  4. mysite
  5. articles
  6. static
  7. articles
  8. css
  9. base.css
  10. static
  11. images
  12. css
  13. default.css
  14. js
  15. templates
  16. base.html
  17. settings.py
  18.  
  19. # looks for static files in each app
  20. STATICFILES_FINDERS = (
  21. 'django.contrib.staticfiles.finders.FileSystemFinder',
  22. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  23. )
  24.  
  25. STATICFILES_STORAGE = (
  26. 'django.contrib.staticfiles.storage.StaticFilesStorage'
  27. )
  28.  
  29. # the absolute path to the directory where collectstatic will collect static files for deployment (OUTPUT)
  30. STATIC_ROOT = ''
  31.  
  32. # This setting defines the additional locations the static files app will traverse if the FileSystemFinder finder is enabled.
  33. STATICFILES_DIRS = (
  34. # used for static assets that aren't tied to a particular app
  35. os.path.join(BASE_DIR, 'static'),
  36. )
  37.  
  38. # URL to use when referring to static files located in STATIC_ROOT
  39. STATIC_URL = '/static/'
  40.  
  41. STATICFILES_DIRS = (
  42. os.path.join(BASE_DIR, "static"), # That's it!!
  43. '/var/www/static/',
  44. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement