Changed index.py to test django
This commit is contained in:
parent
50b41f49d2
commit
443f12f553
17
index.py
17
index.py
|
@ -1,7 +1,18 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
from django import template
|
||||||
from webtools import Web
|
from django.conf import settings
|
||||||
|
|
||||||
Web.render('index.html')
|
settings.configure()
|
||||||
|
t = template.Template(open('index.html','r').read())
|
||||||
|
c = template.Context({})
|
||||||
|
v = t.render(c)
|
||||||
|
|
||||||
|
print('Content-type: text/html')
|
||||||
|
print()
|
||||||
|
|
||||||
|
print(v)
|
||||||
|
|
||||||
|
|
||||||
|
# Web.render('index.html')
|
||||||
|
|
Loading…
Reference in New Issue