mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 13:33:24 +00:00 
			
		
		
		
	version: Display Zulip version in About Zulip dialog.
We record Git details about the merge-base with upstream branches in the zulip-git-version file, if the upstream repository is available. Note that the first Git upgrade after merging the parent commit will not include the merge-base details, since the upstream repository will not have been available. Co-authored-by: Tim Abbott <tabbott@zulip.com> Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							03420831b0
						
					
				
				
					commit
					668b5137b0
				
			@@ -49,13 +49,6 @@ def common_context(user: UserProfile) -> Dict[str, Any]:
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def get_zulip_version_name(zulip_version: str) -> str:
 | 
			
		||||
    if zulip_version.endswith("+git"):
 | 
			
		||||
        return "Zulip " + zulip_version[:-4]
 | 
			
		||||
 | 
			
		||||
    return "Zulip " + zulip_version
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def get_realm_from_request(request: HttpRequest) -> Optional[Realm]:
 | 
			
		||||
    if hasattr(request, "user") and hasattr(request.user, "realm"):
 | 
			
		||||
        return request.user.realm
 | 
			
		||||
@@ -142,8 +135,6 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
 | 
			
		||||
        "request_language": get_language(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ZULIP_VERSION_NAME = get_zulip_version_name(ZULIP_VERSION)
 | 
			
		||||
 | 
			
		||||
    context = {
 | 
			
		||||
        "root_domain_landing_page": settings.ROOT_DOMAIN_LANDING_PAGE,
 | 
			
		||||
        "custom_logo_url": settings.CUSTOM_LOGO_URL,
 | 
			
		||||
@@ -169,7 +160,6 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
 | 
			
		||||
        "password_min_length": settings.PASSWORD_MIN_LENGTH,
 | 
			
		||||
        "password_min_guesses": settings.PASSWORD_MIN_GUESSES,
 | 
			
		||||
        "zulip_version": ZULIP_VERSION,
 | 
			
		||||
        "zulip_version_name": ZULIP_VERSION_NAME,
 | 
			
		||||
        "user_is_authenticated": user_is_authenticated,
 | 
			
		||||
        "settings_path": settings_path,
 | 
			
		||||
        "secrets_path": secrets_path,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user