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

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/h/o/hortonworks-sandbox-HEAD/apps/pig/src/pig/views.py   hortonworks-sandbox(Download)
from pig.models import PigScript, UDF, Job
from pig.templeton import Templeton
from pig.forms import PigScriptForm, UDFForm
from pig.pig_client import PigClient
 
    result['udfs'] = UDF.objects.all()
    if request.method == 'POST':
        form = PigScriptForm(request.POST)
        if not form.is_valid():
            raise PopupException(
        if request.POST.get("script_id"):
            instance = PigScript.objects.get(pk=request.POST['script_id'])
            form = PigScriptForm(request.POST, instance=instance)
            form.save()
        else: