Re: NoReverseMatch if "url" template tag not used with app_name

2020-07-15 Thread Franz Ulenaers
It seems you have specified an app_name in your post/urls.py : *app_name='post'* Have you different name='home' in your apps then you have to use the app_name to make it unique !! Op dinsdag 14 juli 2020 22:08:22 UTC+2 schreef strang: > > I understand what you are trying to explain. > > I ha

NoReverseMatch if "url" template tag not used with app_name

2020-07-14 Thread strang
I understand what you are trying to explain. I have used name=“home” for home view. I’m using urls.py for my app(main URLs.py to route me to my apps urls.py, app urls.py contains path(‘’, HomeView.as_view(), name=‘home’) But when I try to reference this url in templates ({% url ‘home’%})I get

NoReverseMatch if "url" template tag not used with app_name

2020-07-14 Thread Exactly musty
You are using django url, so it should be the same name you gave your url in your URLs.py e.g path('',homeview.as_views, name='home-page') So if I want to call this url in my template I will use the django url which is {% url 'home-page' %}. You will have to check your url and see if what you

NoReverseMatch if "url" template tag not used with app_name

2020-07-14 Thread strang
I just want to confirm if there has been a change in Django3.x In Django2.x i could write something like ** where 'home' is a url pattern in one of my apps(not the main url file) But I get NoReverseMatch when I use the same in Django3 I have to use this convention ** Which one is correct, for D

Re: [django1.9] Url template tag, dotted path and decorator

2016-04-24 Thread knbk
In order to reverse a view by its dotted path, Django needs to know the actual path of the function. It uses the magic view.__module__ and view.__name__ attributes to determine the name. If your decorator doesn't copy these attributes from the inner function to the decorated function, Django do

Re: [django1.9] Url template tag, dotted path and decorator

2016-04-23 Thread Camilo Torres
On Saturday, April 23, 2016 at 1:17:26 PM UTC-4:30, François Magimel wrote: > > Hi! > > I'm facing an issue reversing a dotted path with django 1.9.4. Here are > more details. > > I pass a dotted path to the django template tag "url": > "{% url 'my.app.view.func' arg %}" > And the function

[django1.9] Url template tag, dotted path and decorator

2016-04-23 Thread François Magimel
Hi! I'm facing an issue reversing a dotted path with django 1.9.4. Here are more details. I pass a dotted path to the django template tag "url": "{% url 'my.app.view.func' arg %}" And the function "my.app.view.func" has a decorator which is using "arg". My problem is : when displaying my te

Re: Problem with url template tag and namespaces

2015-04-07 Thread donarb
On Tuesday, April 7, 2015 at 9:19:17 AM UTC-7, donarb wrote: > > I'm having a problem with a generated url using the url template tag, > currently using Django 1.6.5. > > The appname is 'dashboard', here is the main urls.py: > > urlpatterns = pattern

Problem with url template tag and namespaces

2015-04-07 Thread donarb
I'm having a problem with a generated url using the url template tag, currently using Django 1.6.5. The appname is 'dashboard', here is the main urls.py: urlpatterns = patterns("", (r'^dashboard/', include('dashboard.urls', namespace=

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
Issue resolved. The problem was a similar usage of a url template tag without a namespace - in the same template. All I had to do was check the correct line number in the template. Thanks to all. Time for a walk outside. On Tue, Apr 9, 2013 at 5:36 PM, Sithembewena Lloyd Dube wrote: >

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
Issue resolved. The problem was a similar usage of a url template tag without a namespace. All I had to do was check the correct line number in the template. Thanks to all. Time for a walk outside. On Tue, Apr 9, 2013 at 5:36 PM, Sithembewena Lloyd Dube wrote: > New trace below: I am stum

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
New trace below: I am stumped. Request Method: GET Request URL: http://127.0.0.1:8000/contact_us/ Django Version: 1.5.1 Exception Type: NoReverseMatch Exception Value: Reverse for 'contact_us' with arguments '()' and keyword arguments '{}' not found. On Tue, Apr 9, 2013 at 5:34 PM, Sithem

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
Hi all, I have the correct url, but the dev server seems to be caching my old template, even though I updated it to include namespacing. I have restarted the server and cleared my browser cache. contacts On Tue, Apr 9, 2013 at 5:11 PM, Sithembewena Lloyd Dube wrote: > Tom, > > The latter. I di

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
Tom, The latter. I did not call reverse explicitly (not yet). I have implemented namespacing as recommended. Contact Us On Tue, Apr 9, 2013 at 4:59 PM, Tom Evans wrote: > On Tue, Apr 9, 2013 at 3:56 PM, Sithembewena Lloyd Dube > wrote: > > Hi Tom, > > > > I see what you meant. In the docum

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Tom Evans
On Tue, Apr 9, 2013 at 3:56 PM, Sithembewena Lloyd Dube wrote: > Hi Tom, > > I see what you meant. In the documentation (tutorial) namespacing is used in > the form example. Even with that in place, I am having trouble. > > I did notice that I am not getting a 404 error instead, because the url >

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Tom Evans
On Tue, Apr 9, 2013 at 3:43 PM, Sithembewena Lloyd Dube wrote: > Thanks, Tom. > > I am not sure how you mean? In the contact_us app, I am not explicitly > calling reverse. I only have the following: > > from django.shortcuts import render, reverse > > def contact_us(request): > return render(r

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
"contact_us")), >> > >> > and in the contact_us app's urls.py file, I have the following url >> pattern: >> > >> > urlpatterns = patterns('', >> > url(r'^$', views.contact_us, name='contact_us'), >>

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
namespace="contact_us")), >> > >> > and in the contact_us app's urls.py file, I have the following url >> pattern: >> > >> > urlpatterns = patterns('', >> > url(r'^$', views.contact_us, name='contact_us'

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
x27;contact_us.urls', namespace="contact_us")), > > > > and in the contact_us app's urls.py file, I have the following url > pattern: > > > > urlpatterns = patterns('', > > url(r'^$', views.contact_us, name='con

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Tom Evans
_us app's urls.py file, I have the following url pattern: > > urlpatterns = patterns('', > url(r'^$', views.contact_us, name='contact_us'), > ) > > In a template residing in the contact_us app's own templates folder, I use > the ur

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Andrey Kostakov
t;contact_us")), >> > >> > and in the contact_us app's urls.py file, I have the following url >> > pattern: >> > >> > urlpatterns = patterns('', >> > url(r'^$', views.contact_us, name='contact_us'), &

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
> > > urlpatterns = patterns('', > > url(r'^$', views.contact_us, name='contact_us'), > > ) > > > > In a template residing in the contact_us app's own templates folder, I > use > > the url template tag as follows: > &

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Andrey Kostakov
s")), > > and in the contact_us app's urls.py file, I have the following url pattern: > > urlpatterns = patterns('', > url(r'^$', views.contact_us, name='contact_us'), > ) > > In a template residing in the contact_us app's own templa

{% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
;^$', views.contact_us, name='contact_us'), ) In a template residing in the contact_us app's own templates folder, I use the url template tag as follows: Contact Us resulting in the following exception: *NoReverseMatch at /contact_us/* Reverse for 'contact_us' with

Re: 'url' template tag throws and error after upgrading to 1.4

2013-04-04 Thread Bastian
I am trying now in a brand new environment, I have set up a new os, a new virtualenv with all the dependencies upgraded to latest versions, and I installed the project from the repository. It loads with debug = False, quite strange. I need it to work with debug = True and I want to understand wh

Re: 'url' template tag throws and error after upgrading to 1.4

2013-04-04 Thread Bastian
I'm not sure what you mean with 'connect to views'. In this case Django is complaining about the URL tags, the first one that gives an error tries to load django.views.i18n.javascript_catalog. When I manage.py shell I can do from django.views import * without problem. I really have no clue, may

Re: 'url' template tag throws and error after upgrading to 1.4

2013-04-04 Thread Mark Furbee
Can you run manage.py shell and connect to 'views?' On Thu, Apr 4, 2013 at 4:13 PM, Mark Furbee wrote: > It would appear to me that your missing the path to django in your > environment. When you upgraded did you also upgrade to another version of > Python, perhaps? Is the dist-packages/site-pa

Re: 'url' template tag throws and error after upgrading to 1.4

2013-04-04 Thread Mark Furbee
It would appear to me that your missing the path to django in your environment. When you upgraded did you also upgrade to another version of Python, perhaps? Is the dist-packages/site-packages django folder in the same place it was? On Thu, Apr 4, 2013 at 3:58 PM, Bastian wrote: > I have tried

Re: 'url' template tag throws and error after upgrading to 1.4

2013-04-04 Thread Bastian
I have tried with runserver and debug = True and it gives me the error but when I turn off debug then the site loads fine. Then I installed gunicorn and with debug = true and the error appears but with debug = False the site loads fine but without the static content. I don't know if this is a clu

Re: 'url' template tag throws and error after upgrading to 1.4

2013-04-04 Thread Bastian
Thanks for the answer. But it does not really make any difference. I am still trying to figure out what is wrong in there... -- 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

Re: 'url' template tag throws and error after upgrading to 1.4

2013-03-28 Thread Pankaj Singh
s a little further with another 'url' template > tag. So I believe something is wrong with this > specific template tag. I have no idea how to debug it. Is there something > obvious that I missed when upgrading to 1.4? > > Here is the traceback: > > Traceback: > File

'url' template tag throws and error after upgrading to 1.4

2013-03-28 Thread Bastian
it reappears a little further with another 'url' template tag. So I believe something is wrong with this specific template tag. I have no idea how to debug it. Is there something obvious that I missed when upgrading to 1.4? Here is the traceback: Traceback: File "/home/env/projec

Re: usage of url template tag

2012-03-21 Thread Larry Martell
On Wed, Mar 21, 2012 at 2:06 PM, Daniel Roseman wrote: > On Wednesday, 21 March 2012 03:01:23 UTC-7, larry@gmail.com wrote: >> >> >> I'm very new to django. The rest of the URL comes from the index >> function in views.py. I wasn't sure if it violated the DRY principle >> to hardcode it. > > >

Re: usage of url template tag

2012-03-21 Thread Daniel Roseman
On Wednesday, 21 March 2012 03:01:23 UTC-7, larry@gmail.com wrote: > > > I'm very new to django. The rest of the URL comes from the index > function in views.py. I wasn't sure if it violated the DRY principle > to hardcode it. > Fine, but you can't reverse a URL that does not exist. If you tri

Re: usage of url template tag

2012-03-21 Thread Tim Ney
Have you read the Django book section on advanced urlconfs, there is a very good discussion on how to put together customs urls. There are also good examples as well. The Django book is online all you have to do is google for it. On Wed, Mar 21, 2012 at 6:01 AM, Larry Martell wrote: > On Tue, Mar

Re: usage of url template tag

2012-03-21 Thread Larry Martell
On Tue, Mar 20, 2012 at 11:04 PM, Daniel Roseman wrote: > On Tuesday, 20 March 2012 15:27:27 UTC-7, larry@gmail.com wrote: >> >> I'm trying to generate a URL that looks something like this: >> >> >> /report/faloom/EventLog/?message=EventSearchString&tool_ids=13&field_1=Tool&field_2=Time&field_

Re: usage of url template tag

2012-03-20 Thread Daniel Roseman
On Tuesday, 20 March 2012 15:27:27 UTC-7, larry@gmail.com wrote: > > I'm trying to generate a URL that looks something like this: > > > /report/faloom/EventLog/?message=EventSearchString&tool_ids=13&field_1=Tool&field_2=Time&field_3=Module&field_4=Message&submit_preview=Generate+Report > > I ha

usage of url template tag

2012-03-20 Thread Larry Martell
I'm trying to generate a URL that looks something like this: /report/faloom/EventLog/?message=EventSearchString&tool_ids=13&field_1=Tool&field_2=Time&field_3=Module&field_4=Message&submit_preview=Generate+Report I have the values for the arguments (message, tool_ids, etc) available to me. My ur

"Premature end of script headers" and {% url %} template tag

2011-11-07 Thread beh
Hi! I have a problem. Apache returns 500 error like this [Mon Nov 07 11:34:37 2011] [error] [client 123.123.123.123] Premature end of script headers: django.wsgi I create simple view for tests on server. @render_to('dummy.html') def test_permature(request): return {} dummy.html is empty by de

Re: 2 url template tag questions

2011-08-23 Thread Tom Evans
2011/8/23 Yaşar Arabacı : > Hi, > If a use url template tag on a generic view, does urls.py supply required > arguments? For example: > urlpatterns = patterns('django.views.generic.date_based', >     (r'^arsiv/(?P\d{4})/$','archive_year',{ >

2 url template tag questions

2011-08-22 Thread Yaşar Arabacı
Hi, If a use url template tag on a generic view, does urls.py supply required arguments? For example: urlpatterns = patterns('django.views.generic.date_based', (r'^arsiv/(?P\d{4})/$','archive_year',{ 'template_name' : 'blog/yilla

Use Django's url template tag with special characters

2010-11-21 Thread Ed
I'm using django's url tag to move from one view to another: Read more here For most "items" this works perfectly. But I have an "item" with a / character: Sci-Fi/Fantasy. In this instance, I get an error Caught NoReverseMatch while rendering: Reverse for 'wiki_view' with arguments '(u'Sci-fi/Fa

Re: url template tag ; url generation

2010-09-08 Thread bruno desthuilliers
On 8 sep, 08:20, pk wrote: > In my template, I have: > > Read More > » > > I'm seeing that the url generated via the url template tag is, eg: > > http://mydomain.com/mysite/param0val/param1val/param2val/ > (snip) > My urls.py contains: > >

url template tag ; url generation

2010-09-08 Thread pk
In my template, I have: Read More » I'm seeing that the url generated via the url template tag is, eg: http://mydomain.com/mysite/param0val/param1val/param2val/ 'mysite' is the project directory created via, eg, "django-admin.py startproject mysite"; I don&#x

Re: url template tag

2010-06-28 Thread Rufman
disregard. the problem solved itself...there must have been something left behind from before. after deleting all .pyc files and restarting the server it worked On Jun 28, 2:27 pm, Karen Tracey wrote: > On Mon, Jun 28, 2010 at 8:10 AM, Rufman wrote: > > for some reason i get a template syntax e

Re: url template tag

2010-06-28 Thread Karen Tracey
On Mon, Jun 28, 2010 at 8:10 AM, Rufman wrote: > for some reason i get a template syntax error when i use the url tag: > > export > > export is the name of a url. I have added the url() function to all > url.py files. > The url tag certainly works, so the "some reason" lies in information you ha

url template tag

2010-06-28 Thread Rufman
for some reason i get a template syntax error when i use the url tag: export export is the name of a url. I have added the url() function to all url.py files. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: url template tag taking a long time

2010-04-07 Thread Brian Neal
On Apr 6, 11:53 pm, Russell Keith-Magee wrote: > On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote: > > I am on trunk, somewhere around revision 127xx and just updated to > > 12936. A couple of my views render this one particular template, which > > used to take less than a second to see a respon

Re: url template tag taking a long time

2010-04-06 Thread Russell Keith-Magee
On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote: > I am on trunk, somewhere around revision 127xx and just updated to > 12936. A couple of my views render this one particular template, which > used to take less than a second to see a response. Now it is taking > almost a minute. The Django debug

url template tag taking a long time

2010-04-06 Thread Brian Neal
I am on trunk, somewhere around revision 127xx and just updated to 12936. A couple of my views render this one particular template, which used to take less than a second to see a response. Now it is taking almost a minute. The Django debug toolbar reports nothing out of the ordinary in terms of SQL

Re: url template tag help

2009-05-03 Thread Julián C . Pérez
hi everyone... i just took the easiest option i had i rewrite my urls.py file completely again and by now... it works! weird, i know... i'm just appending the former urlpatterns lines i had, one by one, testing every single of them one by one... and working thank u all so much! ;) On May 3, 10:37

Re: url template tag help

2009-05-03 Thread Margie
Yup, I agree with you Kevin. The django framework is very powerful. I started out with no webapp experience, and have also been able to build a very nice web app using django. It took me considerably longer than a week to come up to speed, but I had zero background in html, css, sql, or web apps

Re: url template tag help

2009-05-01 Thread TheCorp
Just ran into a URLs tag issue myself figured id add onto this discussion to reveal a little tidbit that's very important. Be VERY VERY careful of errors in your urls.py file. I was dealing with an issue like this all day and realized I had some incorrect syntax in my urls.py. Things seemed to be

Re: url template tag help

2009-05-01 Thread Kevin Audleman
Malcom, Cheers to that. It's always hard to figure out what attitude you are conveying when you post to a message board so I don't know how I sound in this thread. Forgive me if I sound whiny or complainy, that is certainly not my intent. Quite the contrary, my overall attitude toward Django is

Re: url template tag help

2009-05-01 Thread Malcolm Tredinnick
On Fri, 2009-05-01 at 11:28 -0700, Malcolm Tredinnick wrote: [...] > Certainly the error reporting from some of the URL resolving is a little > weak and that's something we're going to fix at some point. Hopefully > before 1.1 comes out. So bear with us for a little while longer on that > front an

Re: url template tag help

2009-05-01 Thread Malcolm Tredinnick
On Fri, 2009-05-01 at 11:13 -0700, Kevin Audleman wrote: > > > I can't explain any of this, but I've been thinking about your > > question since you posted it beause I know this type of error happens > > to me a lot (and indeed has been hard to debug), but I couldn't put my > > finger on remember

Re: url template tag help

2009-05-01 Thread Kevin Audleman
> I can't explain any of this, but I've been thinking about your > question since you posted it beause I know this type of error happens > to me a lot (and indeed has been hard to debug), but I couldn't put my > finger on remembering what my solution was.  It just happened, I fixed > my syntax er

Re: url template tag help

2009-04-30 Thread Margie
Oh, and one other thing I will add is that if you do find an import error, you sometimes (maybe always?) need to then restart the server. I can't explain any of this, but I've been thinking about your question since you posted it beause I know this type of error happens to me a lot (and indeed h

Re: url template tag help

2009-04-30 Thread Margie
Have you confirmed that you don't have any python syntax errors in any of your .py files, including urls.py? I thinkt that when reverse gets evaluated, it may be importing files at that time. If one of the imports encounters a syntax error, i think that you will in some cases just get an error t

Re: url template tag help

2009-04-30 Thread Kevin Audleman
The other thing is that if there is anything else wrong with your views.py file it can cause Django to throw up this error. See if the error is occurring on the first occurence of {% url %} that gets called for the page you are requesting. That would be a good indication that your error is somewhe

Re: url template tag help

2009-04-30 Thread Karen Tracey
2009/4/30 Julián C. Pérez > > anyone?? > i can't get around this... > and i don't want to hard-code the urls in templates either > :( > Truly, the url template tag is not fundamentally broken, so there is something you are doing that is causing a problem. There

Re: url template tag help

2009-04-30 Thread Julián C . Pérez
anyone?? i can't get around this... and i don't want to hard-code the urls in templates either :( On 30 abr, 09:20, Julián C. Pérez wrote: > by now, i'll try to found some other way to create dynamic urls based > on the views... > maybe using a custom template tag > > On 29 abr, 21:52, Julián C.

Re: url template tag help

2009-04-30 Thread Julián C . Pérez
by now, i'll try to found some other way to create dynamic urls based on the views... maybe using a custom template tag On 29 abr, 21:52, Julián C. Pérez wrote: > uhhh > i tried but nooo... your suggestion doesn't work... > let me show you 2 versions of error... > > 1. "Reverse for 'proyName.vie

Re: url template tag help

2009-04-29 Thread Julián C . Pérez
uhhh i tried but nooo... your suggestion doesn't work... let me show you 2 versions of error... 1. "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." settings: # in proyName.packages.appName.urls.py: ... url(r'^about/$', 'view_aboutPage', name='proy

Re: url template tag help

2009-04-29 Thread Kevin Audleman
You might be able to solve your problem by changing the name attribute of your URL to include "proyName": url(r'^about/$', 'view_aboutPage', name='proyName.view_aboutPage'), --- The error message is telling you exactly what it's looking for, after all: the error: "Reverse for 'pr

Re: url template tag help

2009-04-29 Thread Julián C . Pérez
jajaja it's not top secret what more information should i provide?? On 29 abr, 11:55, Malcolm Tredinnick wrote: > On Wed, 2009-04-29 at 08:10 -0700, Julián C. Pérez wrote: > > actually... i don't use underscores into my url or views names... > > that 'view_aboutPage' was actually just a made up

Re: url template tag help

2009-04-29 Thread Malcolm Tredinnick
On Wed, 2009-04-29 at 08:10 -0700, Julián C. Pérez wrote: > actually... i don't use underscores into my url or views names... > that 'view_aboutPage' was actually just a made up example name Sounds like you need to provide more accurate information then. Provide the actual data that is failing. I

Re: url template tag help

2009-04-29 Thread Malcolm Tredinnick
On Wed, 2009-04-29 at 03:17 -0700, Christian Berg wrote: > it also helps to rename the URL to view-about-page. Dashed do work. > It seems that URL Namen are bound to slug resitrictions. Slugs have nothing to do with it. If you can't use underscores in URL pattern names, it's a bug. Create a small

Re: url template tag help

2009-04-29 Thread Julián C . Pérez
actually... i don't use underscores into my url or views names... that 'view_aboutPage' was actually just a made up example name On 29 abr, 05:17, Christian Berg wrote: > it also helps to rename the URL to view-about-page. Dashed do work. > It seems that URL Namen are bound to slug resitrictions

Re: url template tag help

2009-04-29 Thread Christian Berg
it also helps to rename the URL to view-about-page. Dashed do work. It seems that URL Namen are bound to slug resitrictions. On 29 Apr., 03:06, Julián C. Pérez wrote: > hi everyone > i need some help over here... please! > i don't know what it's wrong... > > the url i'm trying to get around is

Re: url template tag help

2009-04-28 Thread TheCorp
I just found on that having underscores in your view names seems to make some regex stuff for django go funky. Try changing your view names to not have underscores so maybe viewAboutPage or something. Good luck :) On Apr 28, 6:06 pm, Julián C. Pérez wrote: > hi everyone > i need some help over h

url template tag help

2009-04-28 Thread Julián C . Pérez
hi everyone i need some help over here... please! i don't know what it's wrong... the url i'm trying to get around is: http://proyName/about/ the error: "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." in a template, the dispatcher of the error:

Re: request.urlconf does not get used in URL template tag

2009-04-15 Thread Sean Brant
I knew I couldn't be that easy. Thanks for the heads up. Any other work around? besides the patch mentioned. On Apr 15, 11:17 pm, Alex Gaynor wrote: > On Thu, Apr 16, 2009 at 12:15 AM, Sean Brant wrote: > > > If you set request.urlconf in say a Middleware then the reverse > > function and the u

Re: request.urlconf does not get used in URL template tag

2009-04-15 Thread Alex Gaynor
On Thu, Apr 16, 2009 at 12:15 AM, Sean Brant wrote: > > If you set request.urlconf in say a Middleware then the reverse > function and the url tag will not work because those try to match > based on your ROOT_URLCONF. I was trying to find a solution to this > problem and came across this ticket.

request.urlconf does not get used in URL template tag

2009-04-15 Thread Sean Brant
If you set request.urlconf in say a Middleware then the reverse function and the url tag will not work because those try to match based on your ROOT_URLCONF. I was trying to find a solution to this problem and came across this ticket. http://code.djangoproject.com/ticket/5034 Then It dawned on me

Re: How am I supposed to debug a url template tag?

2008-09-03 Thread Malcolm Tredinnick
On Wed, 2008-09-03 at 14:07 -0700, catsclaw wrote: > On Sep 3, 3:48 pm, bruno desthuilliers <[EMAIL PROTECTED]> > wrote: > > Sorry, my crystal ball is down for maintainance - but the answer is > > probably that the django.core.urlresolvers.reverse function didn't > > found a match. The easiest w

Re: How am I supposed to debug a url template tag?

2008-09-03 Thread catsclaw
On Sep 3, 3:48 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > Sorry, my crystal ball is down for maintainance - but the answer is > probably that  the django.core.urlresolvers.reverse function didn't > found a match. The easiest way to check this out would be to test a > direct call to the a

Re: How am I supposed to debug a url template tag?

2008-09-03 Thread bruno desthuilliers
pp.views.list my_name,entry.path > %} > MY_NAME: {{ my_name }} > MY_DIR: {{ my_dir }} > ENTRY_PATH: {{ entry.path }} > {% endfor %} > > And I get the following output: > > (url) MY_NAME,MY_DIR: /myapp/test/list/ > (url) MY_NAME,ENTRY.PATH: > MY_NAME: test > MY_DIR: /

How am I supposed to debug a url template tag?

2008-09-03 Thread catsclaw
.path }} {% endfor %} And I get the following output: (url) MY_NAME,MY_DIR: /myapp/test/list/ (url) MY_NAME,ENTRY.PATH: MY_NAME: test MY_DIR: / ENTRY_PATH: text Why doesn't the second url template tag work? How do I fix it? -- Chris --~--~-~--~~~---~--~~ Yo

Re: Url template tag errors post-8760, invalid literal for int

2008-09-02 Thread bhunter
Is it possible this is still broken? I just updated to r8883 and now some of my {% url %} tags are breaking. I'm seeing a TemplateSyntaxError because the argument is not being converted to a string before being resolved. In other words, this example is breaking: urls.py: r('^view/num=(\d+)')

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
Thanks Malcolm! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
t_quantifier >     return int(values[0]), ch > ValueError: invalid literal for int() with base 10: '3}' > > On Sep 1, 3:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > On Mon, 2008-09-01 at 15:16 -0700, Dave Lowe wrote: > > > I

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:59 -0700, Malcolm Tredinnick wrote: > > On Mon, 2008-09-01 at 15:55 -0700, Dave Lowe wrote: > > I wish I could find that. I've already been looking for anything like > > that and keep coming up empty. None of the URL variables I'm using > > include '}'. > > Not the vari

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:55 -0700, Dave Lowe wrote: > I wish I could find that. I've already been looking for anything like > that and keep coming up empty. None of the URL variables I'm using > include '}'. Not the variables. The regular-expression patterns. In one of your urls.py files. Regar

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
r.py", line 256, in get_quantifier return int(values[0]), ch ValueError: invalid literal for int() with base 10: '3}' On Sep 1, 3:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-01 at 15:16 -0700, Dave Lowe wrote: > > I saw the note about revis

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:16 -0700, Dave Lowe wrote: > I saw the note about revision 8760 introducing changes to reverse and > the url template tag, specifically that passing extra parameters won't > work. I haven't been able to find anywhere in my code where extra > param

Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
I saw the note about revision 8760 introducing changes to reverse and the url template tag, specifically that passing extra parameters won't work. I haven't been able to find anywhere in my code where extra parameters are being passed. However, after I update to 8760, I start g

Re: url template tag problem

2007-07-30 Thread zenx
Thanks Malcom, I changed the views function name but still got the same error so I don't know if it's a bug. I will try to take a closer look at it, but I really don't know why this may happen. Does anybody else has an idea? Thank you, Regards, A Mele On 30 jul, 22:28, Malcolm Tredinnick <[EMA

Re: url template tag problem

2007-07-30 Thread Malcolm Tredinnick
On Mon, 2007-07-30 at 19:28 +, zenx wrote: > Hi, > > I get the following error when trying to use the {% url %} > templatetag. I have read the documentation several times but cannot > understand where is the problem: > > AttributeError at /c/albums/wonderful-world/ > 'str' object has no attr

url template tag problem

2007-07-30 Thread zenx
Hi, I get the following error when trying to use the {% url %} templatetag. I have read the documentation several times but cannot understand where is the problem: AttributeError at /c/albums/wonderful-world/ 'str' object has no attribute 'callback' My urls.py: urlpatterns = patterns('', ur

Re: url template tag with generic views?

2007-04-16 Thread ltbarcly
Nice, thanks for the help! On Apr 16, 2:09 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > On 4/16/07, ltbarcly <[EMAIL PROTECTED]> wrote: > > > > > Is it possible to use the {% url %} tag with generic views? Generic > > views get used more than once in an app presumably, so there would > > have t

Re: url template tag with generic views?

2007-04-16 Thread Jay Parlar
On 4/16/07, ltbarcly <[EMAIL PROTECTED]> wrote: > > Is it possible to use the {% url %} tag with generic views? Generic > views get used more than once in an app presumably, so there would > have to be some way to narrow it down. > > I'm guessing that there might not be a way to do it at this tim

url template tag with generic views?

2007-04-16 Thread ltbarcly
Is it possible to use the {% url %} tag with generic views? Generic views get used more than once in an app presumably, so there would have to be some way to narrow it down. I'm guessing that there might not be a way to do it at this time, which is a shame. --~--~-~--~~