مشكلة مع Flask

السلام عليكم @YaserAlnajjar @Alhakem
كنت اتابع العمل علي ورشة Flask القديمة وقمت بعمل ملفات index.html , style.css وعند تشغيل ملف app.py يعمل جزء من ملف style.css (يعمل ال header , h2 ) بينما لا يعمل الباقي

index.html

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <title>Forums Workshop</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}"">
  </head>
  <body>
    <header>
      <h1>One Million</h1>
    </header>
    <main>
      <h2><a href="#">Member profile</a></h2>
      <hr>
      <button class="button" type="button" name="button">Create</button>
      <table>
        <tr>
          <th>Title</th>
          <th>Edit</th>
          <th>Delete</th>
        </tr>
      </table>
    </main>

  </body>
</html>

style.css

header{
  text-align: center;
  color: red;
  background-color: yellow;
}

h2{
  text-align: center;
  color: blue;
}

table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

td, th {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

.button{
  color: white;
  background-color: black;
}

قمت بتجربة الملفات بعيدا عن Flask بعمل نسخ من الملفات في مجلد منفصل و تعديل الرابط الي ملف style.css وكانت تعمل بشكل جيد , ما هي المشكلة التي تحدث ؟!!
الصورة الاولي وبها المشكلة


الصورة التالية عند التجرية بعيدا عن Flask

1 Like

السلام عليكم
قمت باضافة بعض السطور في ملف index.html و قمت باعادة التجربة مرة اخري فوجدت ان المشكلة قد تم حلها !!!
الفرق ان التجربة الجديدة قمت بها بعد ان اغلقت نافذة المتصفح القديمة بالكامل هل هذا هو السبب ؟!!

1 Like

غالبا حل المشكلة باستعمال hard refresh بمعنى ctrl+f5

1 Like