static files in Django does not upload when I changes the app name

183
May 05, 2018, at 6:55 PM

I ran through weird issue. I have project for website. the project is still under developing process. I am using (Django 1.11). I decided to change one app named polls into ads. I have changed all related names in setting, manage, view, templates and all other related files. also I changed the table labels from the data base(mysql). then I run the server. on chrome and safari the html page is displayed but no css file is loaded. However, on fire fox is working fine. I tried to clear all data history but nothing has changed. I made sure from the setting and path inside setting file. finally, when I disable the ads blocker on chrome and safari (css, javascript, and images all are loaded) and the page displayed as it is supposed. My question here, why is this happen ( happened after I change the app name ) while before I changed the app name, the page is loaded with css and other file even though the add blockers are on. any explain or help to solve this problem

here is portion of the code from the html template:

{% load staticfiles %}
    <link rel="stylesheet" type="text/css" href=" {% static 'ads/style/bootstrap_3.3.7_dist/css/bootstrap.min.css' %}" >
    <link rel="stylesheet" type="text/css" href="{% static 'ads/style/bootstrap_3.3.7_dist/css/bootstrap_theme.min.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'ads/style/first_page.css' %}">

here is the structure of the project

mysite
     mysite   
         init.py    
         settings.py    
         urls.py
         ......
     manage.py
     db.sqlite3

    ads
    static
        ads
           style
               first_page.css
               bootstrap_3.3.7_dist/css/bootstrap.min.css
           images
           javascript

here are portions of settings file:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'ads.apps.AdsConfig',
]

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static"),
]
STATIC_URL = '/static/'

please note that when ever I run the server, there is no error shown and I get this message:

[05/May/2018 08:08:51] "GET /ads/home_page/ HTTP/1.1" 200 16306

so every things seem fine

READ ALSO
Responsive Images with srcset

Responsive Images with srcset

I have been looking into improving my page load speeds for mobile devices and have been reading about the srcset method to create responsive imagesI think this would be very helpful as my site has a number of high quality images that increase the load-time

153
Need different functionality of slick slider

Need different functionality of slick slider

I am using slick slider in my websiteUsing the slick syncing slider which has a main image and below that thumbnails as navigation which keep on sliding

142
Scroll table when highlighted row is the last row visible in table body

Scroll table when highlighted row is the last row visible in table body

Suppose I have a table with 20 rowsBy default first row is highlighted and 6 rows are visible in the screen

113
How to hide div html?

How to hide div html?

I am trying to hide the last DivI use bootstrap

230