Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/d/j/django-lfs-0.7.7/lfs/manage/shipping_methods/views.py   django-lfs(Download)
from lfs.customer.models import Customer
from lfs.manage.shipping_methods.forms import ShippingMethodAddForm
from lfs.manage.shipping_methods.forms import ShippingMethodForm
from lfs.shipping.models import ShippingMethod
from lfs.shipping.models import ShippingMethodPrice
    shipping_method = ShippingMethod.objects.get(pk=shipping_id)
    if form is None:
        form = ShippingMethodForm(instance=shipping_method)
 
    return render_to_string(template_name, RequestContext(request, {
    """
    shipping_method = ShippingMethod.objects.get(pk=shipping_method_id)
    shipping_form = ShippingMethodForm(instance=shipping_method, data=request.POST, files=request.FILES)
 
    if shipping_form.is_valid():
        shipping_form.save()
        # Makes an uploaded image appear immediately
        shipping_form = ShippingMethodForm(instance=shipping_method)

src/d/j/django-lfs-HEAD/lfs/manage/shipping_methods/views.py   django-lfs(Download)
from lfs.customer.models import Customer
from lfs.manage.shipping_methods.forms import ShippingMethodAddForm
from lfs.manage.shipping_methods.forms import ShippingMethodForm
from lfs.shipping.models import ShippingMethod
from lfs.shipping.models import ShippingMethodPrice
    shipping_method = ShippingMethod.objects.get(pk=shipping_id)
    if form is None:
        form = ShippingMethodForm(instance=shipping_method)
 
    return render_to_string(template_name, RequestContext(request, {
    """
    shipping_method = ShippingMethod.objects.get(pk=shipping_method_id)
    shipping_form = ShippingMethodForm(instance=shipping_method, data=request.POST, files=request.FILES)
 
    if shipping_form.is_valid():
        shipping_form.save()
        # Makes an uploaded image appear immediately
        shipping_form = ShippingMethodForm(instance=shipping_method)