This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
from django.template import loader | |
def index(request): | |
#Get Last five Polls | |
latest_questions = Question.objects.order_by('-pub_date')[:5] | |
template = loader.get_template("polls/index.html") | |
context = { | |
'latest_questions':latest_questions, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render | |
def index(request): | |
#Get Last five Polls and now use the render shortcut , I like this option less | |
latest_questions = Question.objects.order_by('-pub_date')[:5] | |
context = { | |
'latest_questions':latest_questions, | |
} | |
return render(request,"polls/index.html",context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Script to install Canto | |
git clone https://github.com/themoken/canto-next.git | |
cd canto-next | |
#sudo $(xcrun --find python3) setup.py install | |
# This didnt work as the System python3 did not play well with ncurses from homebrew | |
# and probably wasnt compiled with built in ncurses support | |
# This uses the compiled Python | |
/usr/local/bin/python3.8 setup.py install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CantoCurses": { | |
"browser": { | |
"path": "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome" | |
}, | |
"color": { | |
"1": 0, | |
"10": 9, | |
"100": 99, | |
"101": 100, |