Did I find the right examples for you? yes no

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)

src/d/j/django-lfs-HEAD/lfs/manage/discounts/views.py   django-lfs(Download)
from lfs.core.utils import LazyEncoder
from lfs.discounts.models import Discount
from lfs.manage.discounts.forms import DiscountForm
from lfs.manufacturer.models import Manufacturer
 
 
    return render_to_string(template_name, RequestContext(request, {
        "form": DiscountForm(instance=discount),
        "discount": discount,
    }))
def add_discount(request, template_name="manage/discounts/add_discount.html"):
    """Provides an add form and saves a new discount method.
    """
    if request.method == "POST":
        form = DiscountForm(data=request.POST, files=request.FILES)
            )
    else:
        form = DiscountForm()
 
    return render_to_response(template_name, RequestContext(request, {
    """
    discount = Discount.objects.get(pk=id)
    discount_form = DiscountForm(instance=discount, data=request.POST)
 
    if discount_form.is_valid():

src/d/j/django-lfs-0.7.7/lfs/manage/discounts/views.py   django-lfs(Download)
from lfs.criteria import utils as criteria_utils
from lfs.discounts.models import Discount
from lfs.manage.discounts.forms import DiscountForm
 
 
 
    return render_to_string(template_name, RequestContext(request, {
        "form": DiscountForm(instance=discount),
        "discount": discount,
    }))
def add_discount(request, template_name="manage/discounts/add_discount.html"):
    """Provides an add form and saves a new discount method.
    """
    if request.method == "POST":
        form = DiscountForm(data=request.POST, files=request.FILES)
            )
    else:
        form = DiscountForm()
 
    return render_to_response(template_name, RequestContext(request, {
    """
    discount = Discount.objects.get(pk=id)
    discount_form = DiscountForm(instance=discount, data=request.POST)
 
    if discount_form.is_valid():

src/d/j/django-lfs-HEAD/lfs/manage/information/views.py   django-lfs(Download)
from lfs.criteria import utils as criteria_utils
from lfs.discounts.models import Discount
from lfs.manage.discounts.forms import DiscountForm
 
# versions