I'm having trouble getting serving static files.
My project is at /home/joel/myappointments
The app is at /home/joel/myappointments/appointments
An example template contains:
<link rel="stylesheet" href="{% static
'appointments/css/bootstrap.4.1.3.min.css' %}">
myappointments/myappointments/settings.py contains:
# Static files (CSS, JavaScript, Images)
#
https://docs.djangoproject.com/en/2.0/howto/static-files/
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static/")
]
STATIC_URL = '/static/'
STATIC_ROOT = '/home/joel/myappointments/static/'
#'/home/joel/myappointments/appointments/static/'
I've tried different options. The present option is after creating
/home/joel/myappointments/static/ and running
python3 manage.py collectstatic
While running the application with:
(venv) root@localhost:/home/joel/myappointments# mod_wsgi-express
start-server wsgi.py --host
myopip.com --user www-data --group
www-data --port 80
I get links like:
http://mysite.com/static/appointments/propellor/typography.css
which are broken.
If I use the development server, it all works.