mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 09:57:37 +03:00 
			
		
		
		
	Update django app naming
This commit is contained in:
		
							parent
							
								
									6094186063
								
							
						
					
					
						commit
						361858950f
					
				| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
"""Main package."""
 | 
			
		||||
"""Project package."""
 | 
			
		||||
 | 
			
		||||
from .containers import Container
 | 
			
		||||
from . import settings
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,4 +128,4 @@ GITHUB_REQUEST_TIMEOUT = 10
 | 
			
		|||
# Search settings
 | 
			
		||||
DEFAULT_LIMIT = 5
 | 
			
		||||
DEFAULT_QUERY = 'Dependency Injector'
 | 
			
		||||
LIMITS = [5, 10, 20]
 | 
			
		||||
LIMIT_OPTIONS = [5, 10, 20]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
                    Limit:
 | 
			
		||||
                </label>
 | 
			
		||||
                <select class="form-control" id="search_limit" name="limit">
 | 
			
		||||
                    {% for value in limits %}
 | 
			
		||||
                    {% for value in limit_options %}
 | 
			
		||||
                    <option {% if value == limit %}selected{% endif %}>
 | 
			
		||||
                        {{ value }}
 | 
			
		||||
                    </option>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ def index(
 | 
			
		|||
        search_service: SearchService = Provide[Container.search_service],
 | 
			
		||||
        default_query: str = Provide[Container.config.DEFAULT_QUERY],
 | 
			
		||||
        default_limit: int = Provide[Container.config.DEFAULT_LIMIT.as_int()],
 | 
			
		||||
        limits: List[int] = Provide[Container.config.LIMITS],
 | 
			
		||||
        limit_options: List[int] = Provide[Container.config.LIMIT_OPTIONS],
 | 
			
		||||
) -> HttpResponse:
 | 
			
		||||
    query = request.GET.get('query', default_query)
 | 
			
		||||
    limit = int(request.GET.get('limit', default_limit))
 | 
			
		||||
| 
						 | 
				
			
			@ -28,7 +28,7 @@ def index(
 | 
			
		|||
        context={
 | 
			
		||||
            'query': query,
 | 
			
		||||
            'limit': limit,
 | 
			
		||||
            'limits': limits,
 | 
			
		||||
            'limit_options': limit_options,
 | 
			
		||||
            'repositories': repositories,
 | 
			
		||||
        }
 | 
			
		||||
    )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user