Re: About the Django URL tag {% url %}……

61 views
Skip to first unread message

Scarl

unread,
Aug 30, 2012, 2:44:24 AM8/30/12
to django...@googlegroups.com
I am so sorry……I didn't provide the render params...

Nikolas Stevenson-Molnar

unread,
Aug 30, 2012, 10:34:04 AM8/30/12
to django...@googlegroups.com
It should still work... the problem may be elsewhere. Would you please
provide the full contents of both url files?

_Nik

On 8/29/2012 7:37 PM, Scarl wrote:
> My python version is 2.7.2 , and django version is 1.2.7
> I have a test just now.
> If i put the name parameter in mysite.urls like url(r'^test/$',
> 'testpage', name='www'), the {% url www %} can work...
> But when I put the name parameter in mysite.myapp.urls like
> url(r'help/$', 'testpage', name='www'), and mysite.urls is
> url(r'test/', include(mysite.myapp.urls)). This time the {% url www %}
> can not work!
> Is it when I use include('mysite.myapp.urls'), the name parameter can
> not work? And the name parameter can only in mysite.urls?
> Can anyone help me? thx!
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/x6qNBIrfKLsJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

Nikolas Stevenson-Molnar

unread,
Aug 30, 2012, 10:37:21 AM8/30/12
to django...@googlegroups.com
Also, your URL patters should start with "^" like your first one does.
And unless you need the older version, I would upgrade to the latest
stable version of Django (1.4.1) before doing anything else.

Amyth Arora

unread,
Aug 31, 2012, 2:49:32 AM8/31/12
to django...@googlegroups.com
Paste the code to your urls.py and highlight which urls are not working.
--
Thanks & Regards
----------------------------

Amyth [Admin - Techstricks]
Email - aroras....@gmail.com, ad...@techstricks.com
Twitter - @a_myth_________
http://techstricks.com/

绯红天空

unread,
Sep 1, 2012, 9:56:05 PM9/1/12
to django...@googlegroups.com


2012/8/31 Amyth Arora <aroras....@gmail.com>
blog.rar
Reply all
Reply to author
Forward
0 new messages