Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
Hi David, It sure is getting clearer! So the only 'dirty way' to get the path shorter in the template tag would be to make them available in the project package (or app package), which indeed sounds like complications in the long run. The more I think of it, the name-tag on the views does seem

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread David Paccoud
Hi Gerard, Views and not found by the template loader but the the PYTONPATH.. For "project.myapp.views.customer_edit", it finds a project package in your PYTHONPATH and follow the path up to "customer_edit" function. Just using "customer_edit" is a shortcut for the same thing. "customer_edit" is

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
Hi David, Thanx for the feedback. The keyword in your sentence below would be *only* i assume. Meaning if not named explicitly, there's no way to get the reverse lookup to work (with the brief notation)? Still makes me wonder where the template loader gets it's information from to be able to

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread David Paccoud
Hi, You can use {% url customer_edit customer.id %} only if customer_edit is declared as the name of view in urls.py. See http://docs.djangoproject.com/en/1.1/topics/http/urls/#id2 for more details. David On Sat, Oct 17, 2009 at 11:10 AM, Gerard wrote: > > Hi All, > > I've been trying to fig

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
Hi Thierry, The actual url used (and working) is: http://192.168.1.81:8000/customer/2/edit Without the end slash. Gerard. Thierry wrote: > Hi, > > Could it be that you are missing trailing slashes in customer add/edit/ > delete url patterns? > E.g try: > (r'^customer/(?P\d+)/edit/$', 'custome

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Thierry
Hi, Could it be that you are missing trailing slashes in customer add/edit/ delete url patterns? E.g try: (r'^customer/(?P\d+)/edit/$', 'customer_edit'), instead of: (r'^customer/(?P\d+)/edit$', 'customer_edit'), Thierry. On 17 oct, 14:12, Gerard wrote: > Hi Boyombo, > > The error I get when

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
Hi Boyombo, The error I get when using {% url customer_edit customer.id %} is: NoReverseMatch at /customer/2 Reverse for 'customer_edit' with arguments '(2L,)' and keyword arguments '{}' not found. # The project url.py: from django.conf.urls.defaults import * urlpatterns = patterns('', (

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread boyombo
Hi Gerard, can you what is your url conf like and the error message you get? On Oct 17, 10:10 am, Gerard wrote: > Hi All, > > I've been trying to figure out why this works: > > {% url project.myapp.views.customer_edit customer.id %} > > And this does not: > > {% url customer_edit customer.id %}

Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
Hi All, I've been trying to figure out why this works: {% url project.myapp.views.customer_edit customer.id %} And this does not: {% url customer_edit customer.id %} I could go for url() in my patterns and decouple view and pattern name, but is it not possible to tell the template loader (?)