Kim Majali wrote on
			06/06/2022		
			
If we have a view that it takes time to load, we want to show the user a message to wait, it takes some time
{% include 'partials/_loading-modal.html' %}
show-loading-after-submit to any form you want to show the loader
show-loading-after-click to any url (a element) you want to show the loader
Note: If you want to test with these CSS classes, you can get the open-source CSS file at agilecss.com Resource: https://stackoverflow.com/questions/8317219/django-show-loading-message-during-long-processing Read more
		
			Kim Majali wrote on
			06/06/2022		
			
  {{ bool_var|yesno:"Agree,Disagree" }}
 
 {% if var == True %} Yes {% else %} No {% endif %}
</code
Read more		
			Kim Majali wrote on
			06/06/2022		
			
zipped_segments = zip(source_segments, target_segments)
for s_segment, t_segment in zipped_segments:
    print('s_segment', s_segment)
    print('t_segment', t_segment)
    print('---------------------')
Read more		
			Kim Majali wrote on
			06/06/2022		
			
from django.contrib.auth.decorators import login_required
@login_required
def pricechecker(request):
Read more		
			Kim Majali wrote on
			06/06/2022		
			
if request.POST['Name']:
    news.name = request.POST['Name']
else:
    print('No name submitted')
if 'customer_id' in request.session:
    customer = Customer.objects.get(id=request.session['customer_id'])
if 'amount' in request.POST:
    payment_amount = float(request.POST['amount'])
if 'amount' in request.GET:
    payment_amount = float(request.GET['amount'])
if 'customer_id' in request.session:
    customer = request.session['customer_id']
if 'username' in request.COOKIES and 'last_connection' in request.COOKIES:
      username = request.COOKIES['username']
Read more