Odlišení webů: takhle to určitě jde, ale možná to jde lépe (a v hezčích barvách)
This commit is contained in:
		
							parent
							
								
									bac96ca2be
								
							
						
					
					
						commit
						3e63e1c768
					
				
					 7 changed files with 30 additions and 1 deletions
				
			
		|  | @ -79,6 +79,7 @@ TEMPLATES = [ | ||||||
|                 'django.contrib.messages.context_processors.messages', |                 'django.contrib.messages.context_processors.messages', | ||||||
|                 'sekizai.context_processors.sekizai', |                 'sekizai.context_processors.sekizai', | ||||||
|                 'header_fotky.context_processors.vzhled', |                 'header_fotky.context_processors.vzhled', | ||||||
|  |                 'various.context_processors.rozliseni', | ||||||
|                 'various.context_processors.april', |                 'various.context_processors.april', | ||||||
|             ) |             ) | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|  | @ -97,3 +97,4 @@ LOGGING = { | ||||||
| # E-maily posílat chceme, ale do terminálu :-) | # E-maily posílat chceme, ale do terminálu :-) | ||||||
| EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||||||
| SEND_EMAIL_NOTIFICATIONS = True | SEND_EMAIL_NOTIFICATIONS = True | ||||||
|  | LOCAL_TEST_PROD = "local" | ||||||
|  |  | ||||||
|  | @ -67,3 +67,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ | ||||||
| 
 | 
 | ||||||
| # E-MAIL NOTIFICATIONS | # E-MAIL NOTIFICATIONS | ||||||
| POSLI_MAILOVOU_NOTIFIKACI = True | POSLI_MAILOVOU_NOTIFIKACI = True | ||||||
|  | LOCAL_TEST_PROD = "prod" | ||||||
|  |  | ||||||
|  | @ -76,3 +76,4 @@ EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend' | ||||||
| # TODO Pouze na otestování testu… Zvolit konferu! | # TODO Pouze na otestování testu… Zvolit konferu! | ||||||
| # XXX: Je to pole, protože implementační detail backendu. | # XXX: Je to pole, protože implementační detail backendu. | ||||||
| TESTOVACI_EMAILOVA_KONFERENCE = ['betatest@mam.mff.cuni.cz'] | TESTOVACI_EMAILOVA_KONFERENCE = ['betatest@mam.mff.cuni.cz'] | ||||||
|  | LOCAL_TEST_PROD = "test" | ||||||
|  |  | ||||||
|  | @ -1182,3 +1182,21 @@ div.gdpr { | ||||||
| label[for=id_skola] { | label[for=id_skola] { | ||||||
| 	font-weight: bold; | 	font-weight: bold; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | .localweb { | ||||||
|  | 	border-left: 20px solid greenyellow; | ||||||
|  | 	border-right: 20px solid greenyellow; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .localweb .login-bar { | ||||||
|  | 	margin-left: -20px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .testweb { | ||||||
|  | 	border-left: 20px solid darkorange; | ||||||
|  | 	border-right: 20px solid darkorange; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .testweb .login-bar { | ||||||
|  | 	margin-left: -20px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -36,7 +36,7 @@ | ||||||
|     {% block script %}{% endblock %} |     {% block script %}{% endblock %} | ||||||
| 
 | 
 | ||||||
|   </head> |   </head> | ||||||
|   <body class='{% if user.is_staff %}org-logged-in{% endif %}'> |   <body class='{{ LOCAL_TEST_PROD }}web{% if user.is_staff %} org-logged-in{% endif %}'> | ||||||
| 
 | 
 | ||||||
|     {% if user.is_staff %} |     {% if user.is_staff %} | ||||||
|       <div class="login-bar" > |       <div class="login-bar" > | ||||||
|  |  | ||||||
|  | @ -1,3 +1,6 @@ | ||||||
|  | from django.conf import settings | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| def april(req): | def april(req): | ||||||
| 	if 'X-April' in req.headers: | 	if 'X-April' in req.headers: | ||||||
| 		try: | 		try: | ||||||
|  | @ -12,3 +15,7 @@ def april(req): | ||||||
| 		return {'april': today.year} | 		return {'april': today.year} | ||||||
| 	return {} | 	return {} | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | def rozliseni(request): | ||||||
|  | 	return {"LOCAL_TEST_PROD": settings.LOCAL_TEST_PROD} | ||||||
|  | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue