Hi,
I'm new to Django. I keep getting a 404 error when I try to pass a "prod"
parameter to a url. I think it is just this last parameter that is giving me
trouble.

Here is my error:
Page not found (404)Request Method:GETRequest URL:
http://localhost/order_closeouts/imgs/WMS%20DIVA%20PANT%20BLK/

Here's my url:

(r'^order_closeouts/(?P<foo>\w{4})/(?P<prod>)w+/$',
 'onhand.views.order_closeouts',  ),

Here is my view:

def order_closeouts(request,  foo=None,  prod=None):
    prod=prod
    ok='notok'
    message1=''
    u=request.user.username
    custs=Cust.objects.all()
    c_num=User.objects.get(username=u)
    custnum=c_num.first_name
    if not custnum or custnum=='':
        return HttpResponseRedirect('/denied/')
    cus=custnum
    for i in custs:
        if custnum in i.custno:
            ok='ok'
    if ok !='ok':
        return HttpResponseRedirect('/denied/')
    search_i=SearchForm()
    form=InvtForm2()
    forms=CustForm()
    forms_mast=SoMastForm()
    forms_tran=SoTranForm()
    #use date
    day=date.today()
    today=day.isoformat()
    if foo=='nchg':
        message1='You did not order any products yet. Please proceed below.'
    if foo=='chgs':
        message1='Your changes were successful! Please continue.'
    if foo=='edit':
        customers=SomastTemp.objects.get(custno=request.user.first_name)
    else:
        customers=Cust.objects.get(custno=request.user.first_name)

    return render_to_response('order_closeouts.html', {'prod':prod,
'foo':foo,'search':search_i,'form':form,'forms':forms, 'today': today,
'user':cus, 'forms_mast':forms_mast,  'forms_tran':forms_tran,
'customers':customers, 'message':message1}, context_instance =
RequestContext(request))

Any help or suggestions would be very much appreciated. Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to