0

I have shown many posts in StackOverflow that those developer using "django-livesync" module to reload the pages and I tried same way but it's not reloading when I change any files.

I followed, https://github.com/fabiogibson/django-livesync and How to automatically reload Django when files change? those techniques are failed that's why posting it again because I didn't see any solution anymore.

I tried,

1st

pip install django-livesync

2nd

added "livesync" in INSTALLED_APPS before 'django.contrib.staticfiles'

3rd

added middleware

'livesync.core.middleware.DjangoLiveSyncMiddleware',

finally

python manage.py runserver

the server is running but reloading not working. Whenever I change any templates files, views, etc page not reloading automatically. below the project structure,

enter image description here

and requirements.txt files for each version

enter image description here

my goal is to reload the Django server http://127.0.0.1:8000/ automatically whenever I do python manage.py runserver. I will be very appreciated if get a good answer, Thanks.

NIKHIL CHANDRA ROY
  • 807
  • 11
  • 16

2 Answers2

0

This is probably a bit late. But I had a similar problem and managed to solve it by adding

DJANGO-LIVESYNC = {
    'PORT': 8000
}

to the settings file. The default isn't 8000.

ZygD
  • 22,092
  • 39
  • 79
  • 102
0

Finally Solved by adding this to settings.py file:

DJANGO_LIVESYNC = {
    'PORT': 8080,
    'HOST': '127.0.0.1'
}

For the Port value use whatever you are using while starting/running the server. For default usage go for 8000.

Shanavas M
  • 1,581
  • 1
  • 17
  • 24