x = Model1.object.all()
y = Model2.object.all()
context = {'from_model_one': x ,'from_model_two': y }
{% for a in from_model_one%}
{{a.id}}
{{a.text}}
{% endfor %}
{% for b in from_model_two %}
{{b.id}}
{{b.text}}
{% endfor %}
apt-get upgrade -u apache2
def foo(request):
messages.success(request, "Huge success!")
return render(request, 'index.html')
{% for message in messages %}
<div class="alert alert-{{ message.tags }}">{{ message }}</div>
{% endfor %}
import os
import sys
f = open('workfile', 'w')
for line in f:
os.system('wget %s' % (line))
#!/bin/bash
for i in `cat links.txt `
do
wget "$i"
done
exit 0
<div class="yashare-auto-init"
data-yashareTitle="{{object.title}}" data-yashareLink="{{object.get_absolute_url}}"
data-yashareL10n="en" data-yashareType="big" data-yashareQuickServices="facebook,twitter,gplus" data-yashareTheme="counter"></div>