Ok i got it new version problem........
I ran commond this..

find . -type f -print0 | xargs -0 sed -i 's/ url \([^" >][^ >]*\)/ url "\1"/g'

  It'll go through all of your template files and replace this:

{% url index.html %}

with this

{% url "index.html" %}


Thanks to all


On Mon, Apr 1, 2013 at 1:58 PM, Avnesh Shakya <[email protected]> wrote:

> hi,
>     I was using django 1.4 version in window 7. now i am using django 1.5
> version using virtualenv in ubuntu. now i am running my old project it's
> generating error.
>
> error is -
> NoReverseMatch at /
>
>
> 'url' requires a non-empty first argument. The syntax changed in Django 1.5, 
> see the docs.
>
>  Request Method: GET  Request URL: http://127.0.0.1:8000/  Django Version:
> 1.5.1  Exception Type: NoReverseMatch  Exception Value:
>
> 'url' requires a non-empty first argument. The syntax changed in Django 1.5, 
> see the docs.
>
>  Exception Location: 
> /home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django/template/defaulttags.py
> in render, line 402  Python Executable:
> /home/avin/.virtualenvs/DJ/bin/python  Python Version: 2.7.3  Python Path:
>
> ['/home/avin/learnt',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django_socialregistration-0.5.10-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/mock-1.0.1-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/python_openid-2.2.5-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/oauth2-1.5.211-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/django_socialregistration-0.5.10-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/mock-1.0.1-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/python_openid-2.2.5-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/oauth2-1.5.211-py2.7.egg',
>  
> '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7/plat-linux2',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7/lib-tk',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7/lib-old',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages',
>  '/home/avin/.virtualenvs/DJ/lib/python2.7/site-packages']
>
>  Server time: Mon, 1 Apr 2013 13:10:52 +0530
>  Error during template rendering
>
> In template /home/avin/learnt/learnt/templates/homepage/index.html, error
> at line *44*
> 'url' requires a non-empty first argument. The syntax changed in Django
> 1.5, see the docs. 34 </div> 35 {% endblock %} 36 {%block navi%} 37 <div
> class="row"> 38 <div class="twelve columns"> 39 <nav class="top-bar"> 40 <ul>
> 41 <!-- Title Area --> 42 <li class="name"> 43 <h1> 44 <a href="{% url
> homepage_index %}"> 45 Learning Tracker 46 </a> 47 </h1> 48 </li> 49 <li
> class="toggle-topbar"><a href="#">hhh</a></li> 50 </ul> 51 <ul> 52 <li
> class="name"> 53 <h1> 54 <a class="active" href="{% url homepage_index
> %}">home</a>
> Traceback Switch to copy-and-paste view <http://127.0.0.1:8000/#>
>
>    -
>    
> /home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django/core/handlers/base.pyin
>    get_response
>    1.
>
>                               response = callback(request, *callback_args, 
> **callback_kwargs)
>
>       ...
>     ▶ Local vars <http://127.0.0.1:8000/#>
>    - /home/avin/learnt/lrntkr/views.py in index
>    1.
>
>           return render_to_response('homepage/index.html', 
> ctx,context_instance=RequestContext(request))
>
>       ...
>     ▶ Local vars <http://127.0.0.1:8000/#>
>    -
>    
> /home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django/shortcuts/__init__.pyin
>    render_to_response
>    1.
>
>           return HttpResponse(loader.render_to_string(*args, **kwargs), 
> **httpresponse_kwargs)
>
>       ...
>     ▶ Local vars <http://127.0.0.1:8000/#>
>    -
>    
> /home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django/template/loader.pyin
>    render_to_string
>    1.
>
>               return t.render(context_instance)
>
>       ...
>     ▶ Local vars <http://127.0.0.1:8000/#>
>    -
>    
> /home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django/template/base.pyin
>    render
>    1.
>
>                   return self._render(context)
>
>       ...
>     ▶ Local vars <http://127.0.0.1:8000/#>
>    -
>    
> /home/avin/.virtualenvs/DJ/local/lib/python2.7/site-packages/django/template/base.pyin
>    _render
>    1.
>
>               return self.nodelist.render(context)
>
>
> Please help me how to remove this.....
>
> THANKS,
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to