Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(10)  |  Derive(0)  |  Import(4)

src/u/p/UPDIAN-0.6/updian/frontend/forms.py   UPDIAN(Download)
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
#  USA
from ..serverlist import Server
 
def server_from_form(form):
    return Server(hostname=form['hostname'],

src/u/p/UPDIAN-HEAD/updian/frontend/forms.py   UPDIAN(Download)
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
#  USA
from ..serverlist import Server
 
def server_from_form(form):
    return Server(hostname=form['hostname'],

src/u/p/UPDIAN-0.6/updian/frontend/views.py   UPDIAN(Download)
from ..frontend import app
from .. import config
from ..serverlist import Server, ServerList
 
@app.route('/')
 
    if hostname is None:
        server = Server(None)
    else:
        try:
            server_id = serverlist.index(Server(hostname))
            else:
                # edit existing entry
                existing_id = serverlist.index(Server(request.form['host_id']))
                serverlist[existing_id] = server
 
def delete_server():
    serverlist = get_serverlist()
 
    host_to_remove = request.form['hostname']
    serverlist.remove(Server(host_to_remove))

src/u/p/UPDIAN-HEAD/updian/frontend/views.py   UPDIAN(Download)
from ..frontend import app
from .. import config
from ..serverlist import Server, ServerList
 
@app.route('/')
 
    if hostname is None:
        server = Server(None)
    else:
        try:
            server_id = serverlist.index(Server(hostname))
            else:
                # edit existing entry
                existing_id = serverlist.index(Server(request.form['host_id']))
                serverlist[existing_id] = server
 
def delete_server():
    serverlist = get_serverlist()
 
    host_to_remove = request.form['hostname']
    serverlist.remove(Server(host_to_remove))