gksudo /path/to/exec
return render(request, 'ex/excursions.html',
{'list_of_excursions': Excursion.objects.all() })
{% for ex in list_of_excursions %}
{% if forloop.first %}
первона
{% endif %}
<a href="{{ ex.get_absolute_url }}">ex.name</a>
{% else %}
нифига нет екскурсий
{%endfor%}
r'^excursions$'
надо со слешем на конце писать #
d = []
with open(file, 'r') as f:
for i in f:
print(i)
d.append(i)
byte_count = 8
with open("myfile", "rb") as f:
byte = f.read(byte_count)
while byte != b"":
# Do stuff with byte.
byte = f.read(byte_count)