I basically managed to make my page run, but I have problems with displaying images and graphs.
- My static images won't show. In my html I use: img src={%static 'images/Capture.PNG'%} alt="" (with the arrow signs around, which don't show here) and I also tried it with img src=/static/images/Capture.PNG alt="" and both don't deliver the images. I checked and the folder and the files are there. How can I access them?
- I generate a 3D plot from the user input and want to output it as well. However, it results in an error saying: 'Unknown projection '3d'' in the line ax = fig.gca(projection='3d') despite that I include this in the code as well: from mpl_toolkits.mplot3d import Axes3D How can I make this work?
Both issues do not occur if I let the code run in the browser from my computer. In my settings.py file I have following code:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(file))) TEMPLATES_DIR=os.path.join(BASE_DIR,'templates')
STATIC_DIR=os.path.join(BASE_DIR,'static')
STATIC_URL = '/static/' STATICFILES_DIRS=[ STATIC_DIR, ]
Thanks