Skip to content

Instantly share code, notes, and snippets.

@bencleary
Created December 13, 2017 12:10
Show Gist options
  • Save bencleary/a25c72c4d27304fe56b81b9db650e6f8 to your computer and use it in GitHub Desktop.
Save bencleary/a25c72c4d27304fe56b81b9db650e6f8 to your computer and use it in GitHub Desktop.
Fixes to your project
# Added img tag to view picture
<img src="{{object.image.url}}">
# Changed the name you had it as MEDIA_url
MEDIA_URL = '/media/'
# changed the file to use the media url rather than static as this causes conflict
# django URLS will look for the first one matching a pattern, in this case it was looking for and trying to the user uploads from
# static_cdn rather than media_cdn
urlpatterns =urlpatterns+static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment