mirror of
				https://github.com/django/daphne.git
				synced 2025-11-04 09:37:32 +03:00 
			
		
		
		
	Fix circular import issue
This commit is contained in:
		
							parent
							
								
									4bab456c61
								
							
						
					
					
						commit
						4437e04528
					
				| 
						 | 
					@ -6,7 +6,6 @@ import importlib
 | 
				
			||||||
from django.core.exceptions import ImproperlyConfigured
 | 
					from django.core.exceptions import ImproperlyConfigured
 | 
				
			||||||
from django.utils import six
 | 
					from django.utils import six
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from .handler import ViewConsumer
 | 
					 | 
				
			||||||
from .utils import name_that_thing
 | 
					from .utils import name_that_thing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,6 +46,9 @@ class Router(object):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        # We just add the default Django route to the bottom; if the user
 | 
					        # We just add the default Django route to the bottom; if the user
 | 
				
			||||||
        # has defined another http.request handler, it'll get hit first and run.
 | 
					        # has defined another http.request handler, it'll get hit first and run.
 | 
				
			||||||
 | 
					        # Inner import here to avoid circular import; this function only gets
 | 
				
			||||||
 | 
					        # called once, thankfully.
 | 
				
			||||||
 | 
					        from .handler import ViewConsumer
 | 
				
			||||||
        self.add_route(Route("http.request", http_consumer or ViewConsumer()))
 | 
					        self.add_route(Route("http.request", http_consumer or ViewConsumer()))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user