So here is the short story because I’m desperate and in a rush: I’ve been bombarded with everything lately and I haven’t had time to work on my OS project. It shouldn’t be that hard, but I had to pull an all nighter to even create something… Now my problem is the fallowing: style,bootstrap,js,media are not loading. I tried with {% load static %} but to no extend. I used this fallowing tutorial https://www.youtube.com/watch?v=OTmQOjsl0eg . I have pretty much everything he has there. I know it’s a long video, but maybe you guys can skip most parts untill you get to around 1:30:00 .
I don’t know really, but this is my last resort.
Next up, I ll send you the actual HTML which I pretty much just copy-pasted it into the template folder:
Pc parts - Home page<header class='position-fixed d-flex flex-row justify-content-between align-items-center px-5 py-3'>
<div id="logo"><a href='index.html'><img src='./assets/media/lenovo_logo.png' alt='pc_logo' /></a></div>
<nav>
<a class='p-2 active-page' href='index.html'>Home</a>
<a class='p-2' href='product.html'>Product</a>
<a class='p-2' href='contract.html'>Contract</a>
<a class='p-2' href='meetings.html'>Meetings</a>
<a class='p-2' href='offert.html'>Offert</a>
<a class='p-2' href='competitors.html'>Competitors</a>
<a class='p-2' href='reports.html'>Reports</a>
</nav>
</header>
<section id="showcase" class="position-relative d-flex flex-column justify-content-center align-items-center">
<div class='container'>
<h1 class='mb-3 font-weight-bold'>Computer Parts</h1>
<p class='font-italic mb-4'>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Sequi, rem.</p>
<a class='d-inline-block py-2 px-4 rounded'>Buy Now</a>
</div>
</section>
<section id="new-arrivals">
<div class="container p-5">
<h2 class='mb-5'>New Arrivals</h2>
<div class="arrivals-wrapper d-flex justify-content-between align-items-stretch">
<div class="arrival-box text-center">
<div class='mb-3'>
<img src='./assets/media/gear-1.jpg' alt='arrival-box' />
</div>
<h4 class='arrival-title mb-3'>Razer Keyboard</h4>
<p class="arrival-price"><span class='mr-1'>$</span> 50</p>
</div>
<div class="arrival-box text-center">
<div class='mb-3'>
<img src='./assets/media/gear-2.jpg' alt='arrival-box' />
</div>
<h4 class='arrival-title mb-3'>Nvidia RTX 2080 TI</h4>
<p class="arrival-price"><span class='mr-1'>$</span> 1000</p>
</div>
<div class="arrival-box text-center">
<div class='mb-3'>
<img src='./assets/media/gear-3.jpg' alt='arrival-box' />
</div>
<h4 class='arrival-title mb-3'>Razer Gay</h4>
<p class="arrival-price"><span class='mr-1'>$</span> 100</p>
</div>
</div>
</div>
</section>
This is just the index. I already created the static folder and went on settings to do
STATIC_URL = ‘/static/’
STATICFILES_DIRS = [
os.path.join(BASE_DIR, ‘static’),
]
STATIC_ROOT = os.path.join(BASE_DIR, ‘assets’) , generated the assets folder and also written "{% static ‘./path’ %} for most of the href and the only thing showing is the browser’s tab icon.
I respected every step of that video and it worked for that man. So I believe my problem lies in the HTML part. I think? I don’t know.
If there is no short solution for my problem, then please just ignore this topic. You can even close it. Again, I’m writing here as my last resort. It’s 13:22 PM and I need to present it by 16:00 PM.
Thanks for reading!