26👍
If you develop locally using Django’s server there’s no need to use the collectstatic
command, it is only meant to collect all static dependencies to a single access point where you can point your ‘real’ server to, e.g. apache, lighttpd, nginx etc.
As for your problem, you insinuate it ‘magically’ fixes it self after a few days. Have you tried resetting your browser’s cache?
8👍
In my case, my browser was caching the Js and CSS files and thus I was unable to see the changes.
You can try hard refreshing the page
For chrome/chromium browsers:
Ctrl + F5 or Ctrl + Shift + R
both works for me.
- Best way to reference the User model in Django >= 1.5
- Django database synchronization for an offline usage
- How to return data with 403 error in Django Rest Framework?
3👍
Do a Hard Refresh in Browser
Firefox:
Window, Linux: 1.] ctrl
+ F5
2.] Ctrl
+ Shift
+ R
Mac 1.] Command
+ Shift
+ R
Chrome:
Window, Linux: 1.] ctrl
+ F5
2.] Ctrl
+ usual refresh
Mac 1.] Command
+ Shift
+ R
2.] Ctrl
+ usual refresh
Safari:
Mac 1.] Shift
+ Command
+ R
- How to unit test methods inside django's class based views?
- Django render_to_string() ignores {% csrf_token %}
2👍
clearing cache worked for me.
after deleting it 2 times, changes are displayed by just refresh button
- 'Questions ' object is not iterable Django
- Trying to pass a QuerySet as initial data to a formset
- Django app in heroku getting worker timeout error
2👍
just try hard refreshing the page
For chrome/chromium browsers:
Ctrl + Shift + R
it’s done!
- 'WSGIRequest' object has no attribute 'session' while upgrading from django 1.3 to 1.9
- How to set timeout for urlfetch in Google App Engine?
- How to append pages of data using jQuery and Django pagination?
- How to know what django version i use? is it 1.0, 1.1, or 1.2?
- TimeField format in Django template
0👍
Use incognito mode to test the changes, as the normal window will keep saving your changes in cache which is not the case with incognito window.
- Have a url that accepts all characters
- How can I rename a column label in Django Admin for a field that is a method//property?
0👍
If its not updating the css you changed. first make sure you are making changes in static file directory.
After making that changes run command python manage.py collectstatic
and then runserver.
Make sure to refresh browser by ctrl and f5.
Hopefully it will works. peace
0👍
(1)Simply I first remove CSS file from static folder and after that I refresh Server.
(2)After that my template did not reflect any CSS to my html page
(3) After that I simply restore my same name edited css file in static folder and it work properly .
(4) After that your CSS is not run properly than you should add this directory in settings.py
STATICFILES_DIRS = [
os.path.join(BASE_DIR,'static'),
]
*If not your CSS not apply just check your all link code should be