Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work if your templates are in a django app #5

Open
morenoh149 opened this issue Sep 22, 2019 · 2 comments
Open

does not work if your templates are in a django app #5

morenoh149 opened this issue Sep 22, 2019 · 2 comments

Comments

@morenoh149
Copy link

I get error

$ python manage.py runserver                                                                                           
Traceback (most recent call last):                                                                                     
  File "manage.py", line 10, in <module>                                                                               
    execute_from_command_line(sys.argv)                                                                                
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()                                                                                                  
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)                                                            
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/django/core/management/base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)                                                                                 
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 60, in execute
    super().execute(*args, **options)                                                                                  
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/django/core/management/base.py", line 353, in execute
    output = self.handle(*args, **options)                                                                             
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/livesync/management/commands/runserver.py", line 110, in handle
    self.start_liveserver(**options)                                                                                   
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/livesync/management/commands/runserver.py", line 107, in start_liveserver
    self._start_watchdog()                                                                                             
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/livesync/management/commands/runserver.py", line 81, in _start_watchdog
    self.file_watcher.start()                                                                                          
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/livesync/fswatcher/watcher.py", line 18, in start
    self._schedule_all()                                                                                               
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/livesync/fswatcher/watcher.py", line 12, in _schedule_all
    self.observer.schedule(handler, path, recursive=True)                                                              
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/watchdog/observers/fsevents.py", line 172, in schedule
    return BaseObserver.schedule(self, event_handler, path, recursive)                                                 
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/watchdog/observers/api.py", line 290, in schedule
    timeout=self.timeout)                                                                                              
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/watchdog/observers/fsevents.py", line 73, in __init__
    self.snapshot = DirectorySnapshot(watch.path, watch.is_recursive)                                                  
  File "/Users/harrymoreno/.local/share/virtualenvs/foo-TMIWqqTS/lib/python3.7/site-packages/watchdog/utils/dirsnapshot.py", line 206, in __init__
    st = stat(path)                                                                                                    
FileNotFoundError: [Errno 2] No such file or directory: '/Users/harrymoreno/programming/foo/bar/templates'             

my project looks like this

.
├── README.md
├── __init__.py
├── manage.py
├── mysite
├── polls
├── static
└── staticfiles

templates are in polls/templates

@fabiogibson
Copy link
Owner

Can you provide a little bit more details on how to reproduce this error? Just adding templates to django apps seems to work just fine over here.

@morenoh149
Copy link
Author

I could but django-livereload-server seems to work fine. I think my templates are in a different place than in your example, so there's that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants