OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Interval – Plugin development › Re: Re: Interval – Plugin development
May 20, 2014 at 12:32 pm
#26664
Lamby
Participant
Hi,
I am not sure what I am missing. I can’t seem to get a page to render. All I get is a blank page with the word “None”.
I have a plugin in the plugin directory and get:
plugins loaded:
So the plugin loads, and the test string prints out and I get “HTTP/1.1 GET /sunset” – 200 OK”
It is pretty simple code (I have stripped everything back to try to get the web page to load)
#!/usr/bin/env python
#from gpio_pins import *
from urls import *
import web, json, time, gv
urls.extend() # Add a new url for this plugin.
class sunset:
def __init__(self):
self.render = web.template.render('templates/')
def GET(self):
print "testing Sunset"
and
Sunset.html
OpenSprinkler Sunset Settings
Location of your OpenSprinkler
(This is in Latitude and Longitude, you can find this on <a
href="http://mygeoposition.com/">http://mygeoposition.com/)
Latitude
Longitude