Reputation: 2452
I just bought from a marketplace a template for my site. The thing is that this template has relative links to its resources (styles, images, scripts, etc). Of course, all the links are currently broken. My question is: what could be the best approach to fix these links?.
I don't thing that setting all the links to {{ STATIC_URL }} be a good idea since this template has a lot of files, resources and links.
Note: When I say "template" I'm meaning a folder with a lot of HTML, CSS and images files.
Thanks in advance!
Update:
This is how my problem looks: https://www.dropbox.com/s/gbtfjaaaqxw7coo/error.png
Upvotes: 0
Views: 74
Reputation: 2452
Solved, I just added to my urls.py this:
urlpatterns += patterns(
'django.contrib.staticfiles.views',
url(r'assets/(?P<path>.*)$', 'serve'),
)
And set STATIC_URL = 'assets/'
Upvotes: 1