﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23810	Passing 'start' from django url gives error “start() takes exactly 2 arguments (1 given) ”	yogeshdmca	yogesh	"unfortunately i am getting a unexpected error in Django. I have a this urls :


{{{
urlpatterns += patterns('ads.search',
        url(r'^getsubcategories/$', 'getsubcategories', name=""getsubcategories""),
        url(r'^anuncios/([\w\-]+)/$', 'anuncios_search', name=""anuncios_search""),
)
}}}

When I am going to call url ""anuncios_search"" this will work for all search patterns accept ""/anuncios/start/"", please see below for working urls:

examples:

1) /anuncios/avc/ : this works.

2) /anuncios/finds/: this works .

3) /anuncios/start-day/: this works .

4) /anuncios/starts/: this works .

5) /anuncios/start/: this url throwing me error :


{{{
Internal Server Error: /anuncios/start/
Traceback (most recent call last):
  File ""/home/yogesh/ENV/munda/local/lib/python2.7/site-packages/django/core/handlers/base.py"", line 114, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
TypeError: start() takes exactly 2 arguments (1 given)
[13/Nov/2014 05:36:57] ""GET /anuncios/start/ HTTP/1.1"" 500 11496
}}}

my views.py is :


{{{
def anuncios_search(request,search_text=None):
    """"""
    This method for home page search, for acept contactos category
    """"""
    if search_text:
        search_text_list = [i for i in search_text.split(""-"") if len(i)>2]
    else:
        search_text_list=[]

    ads = Ad.objects.exclude(subcategory__category__adult=True,user__is_active=True).order_by('-active','-republishDate')
    if search_text_list:
        ads = ads.filter(
            reduce(lambda x, y: x | y, [Q(title__icontains=word) for word in search_text_list])|
            reduce(lambda x, y: x | y, [Q(description__icontains=word) for word in search_text_list])
            ).order_by('-active','-republishDate')

    current_filters= {'current_category':None,'ads':ads_paginator(request,ads)}
    current_filters['search_text'] = search_text and "" "".join(search_text.split(""-"")) or None
    current_filters['search_text_list'] = search_text_list and search_text_list or None
    return render(request,'search/search.html',current_filters)
}}}

Please help me to resolve this bug.
Thanks in advance"	Bug	closed	Core (URLs)	1.6	Normal	needsinfo	django-url	yogeshdmca	Unreviewed	0	0	0	0	0	0
