hi, jimmy you should pass the name of your func with url in template. such as your example, in your urls.py, you update the url: url(r'card/create$', 'card.views.create_card', name = 'create_card'), and then you can use the url in your template like this : {% url create_card %}
在 2011年8月7日星期日,Jimmy <jimmy.don.k...@gmail.com> 写道: > Hi, > > I got the error "Caught ImportError while rendering: No module named > urls" when using: > > {% url 'card.views.create_card' %} in the template file > > in the urls.py the route to the url is: > > urlpatterns = patterns('', > url(r'card/create$', 'card.views.create_card'), > ) > > The Django version I use is 1.3 > > May I know what did I miss in setting? > > -- > 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. > > -- 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.