Hi Ken,
Thanks for that, I would have been looking down that whitenoise rabbit hole if you didnt say that.
So I have had some success, where I have configured correctly and the styling on the admin pages are back. however still no luck with the download button.
django_project.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias /robots.txt /path/to/mysite.com/static/robots.txt
Alias /favicon.ico /path/to/mysite.com/static/favicon.ico
Alias /static /home/bashaar/rp-portfolio/staticfiles
<Directory /home/bashaar/rp-portfolio/staticfiles>
Require all granted
</Directory>
Alias /uploads /home/bashaar/rp-portfolio/uploads
<Directory /home/bashaar/rp-portfolio/uploads>
Require all granted
</Directory>
<Directory /home/bashaar/rp-portfolio/personal_portfolio>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIScriptAlias / /home/bashaar/rp-portfolio/personal_portfolio/wsgi.py
WSGIDaemonProcess django_app python-path=/home/bashaar/rp-portfolio python->
WSGIProcessGroup django_app
</VirtualHost>
Reading the doc on the site I feel I have configured settings.py correctly
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]
and I feel I have loaded and deployed the static files correctly on my html page
<!-- pages/templates/pages/home.html -->
{% extends "base.html" %}
<a href="{% url 'home' %}"></a>
{% block page_content %}
<body>
{% load static %}
<div id="page-wrap">
<img src="{% static 'images/BashaarBW.jpg' %}" alt="Photo of Bashaar" id="pic">
<h1 class="fn">Bashaar Dhoot</h1>
<div id="contact-info" class="vcard">
<!-- Microformats! -->
<p>
Tel: <span class="tel">+447940 161 559</span><br />
Email: <a class="email" href="mailto:bashaardhoot@gmail.com">bashaardhoot@gmail.com</a>
</p>
</div>
<div id="objective">
<p>
Coming from a family of doctors, I've naturally gravitated towards technologies that can help individuals in the
healthcare sector. For my dissertation I created a Tumour detection application using MATLAB, taking stock
images of MRI scans to identify tumours in the brain. I built a system where a user was able to upload an
image and, using 'for-loops', highlight the tumorous area. I was pleased with the outcome, having successfully
created a user-friendly application for people to self-identify possible brain tumours. Given the opportunity to
continue the programming for the application I believe it would be possible to develop it to accurately detect
tumours before they would become harmful to the individual.
</p>
</div>
<div class="clear"></div>
<dl>
<dd class="clear"></dd>
<dt>Education</dt>
<dd>
<h2>The Open University</h2>
<p><strong>Major:</strong> Computing and ICT<br />
<strong>Minor:</strong>UX Design</p>
</dd>
<dd class="clear"></dd>
<dt>Skills</dt>
<dd>
<h2>Computer skills</h2>
<p>Python, Matlab, HTML, CSS, Microsoft productivity software (Word, Excel, etc), Adobe Creative Suite, Windows</p>
<h2>Office skills</h2>
<p>Office and records management, database administration, event organization, customer support, travel coordination</p>
</dd>
<dd class="clear"></dd>
<dt>Experience</dt>
<dd>
<h2>The Open Univertsy <span>Student - London - 2019-2022</span></h2>
<ul>
<li>Created an application that recognises Tumors in MRI Scans</li>
<li>Coordinated with staff and students to create an Open Universty sports website</li>
<li>Used Onlie fourums to create diffrent concepts for applications used in other students porjects</li>
</ul>
<h2>The City of London <span>Ranger - Hampstead Heath - present</span></h2>
<ul>
<li>Overall management of the site</li>
<li>Managing stock for all employees working in different areas</li>
<li>Managing all sports & recreational activities in the Extension</li>
</ul>
</dd>
<dd class="clear"></dd>
<dt>Hobbies</dt>
<dd>Application Design, Machine Learning Projects, Website Design</dd>
<dd class="clear"></dd>
<dt>References</dt>
<dd>Available on request</dd>
<dd class="clear"></dd>
</dl>
<div class="clear"></div>
<div class="centerButton">
<a href="{% url 'static' %}" download="BashaarCV.rtf">
<button class="buttonCV" type="button">Download CV!</button>
</a>
</div>
</div>
</body>
{% endblock page_content %}
so still don’t unserstand why the styling on the page renders but my rtf file will not download? I have read the ‘staticfiles’ DIR should not be at root level?
thanks