mirror of
				https://github.com/cookiecutter/cookiecutter-django.git
				synced 2025-11-04 01:47:28 +03:00 
			
		
		
		
	Replace os.environ.get with env call in local.py
This commit is contained in:
		
							parent
							
								
									17739ff263
								
							
						
					
					
						commit
						df1ce737d5
					
				| 
						 | 
				
			
			@ -62,9 +62,8 @@ DEBUG_TOOLBAR_CONFIG = {
 | 
			
		|||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#internal-ips
 | 
			
		||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2']
 | 
			
		||||
{% if cookiecutter.use_docker == 'y' -%}
 | 
			
		||||
import socket
 | 
			
		||||
import os
 | 
			
		||||
if os.environ.get('USE_DOCKER') == 'yes':
 | 
			
		||||
if env('USE_DOCKER') == 'yes':
 | 
			
		||||
    import socket
 | 
			
		||||
    hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
 | 
			
		||||
    INTERNAL_IPS += [ip[:-1] + '1' for ip in ips]
 | 
			
		||||
{%- endif %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user