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 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 error, but still got reverseMatch error message. Restarted the server, and it was gone. Margie On Apr 30, 4:56 pm, Margie <margierogin...@yahoo.com> wrote: > 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 that indicates the > reverse failed. I got this just now, in fact. I would recommend > importing all of your files from within manage.py shell, ie: > > manage.py shell > from app.urls import * > from app.models import * > > I have encountered many errors that were hard to debug based on the > error message in the browser, but it becomes obvious when you import > the files at the prompt. > > Margie > > On Apr 30, 8:52 am, Julián C. Pérez <jcp...@gmail.com> wrote: > > > 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 <jcp...@gmail.com> 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. Pérez <jcp...@gmail.com> wrote: > > > > > 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='proyName.link_aboutPage'), ... > > > > # in the template (about.html): > > > > ... <a href="{% url link_aboutPage%}">show 'about'<a> ... > > > > > 2. "Reverse for '<function link_aboutPage at 0x015A8670>' with > > > > arguments '()' and keyword arguments '{}' not found." > > > > settings: > > > > # in proyName.packages.appName.urls.py: > > > > ... url(r'^about/$', 'view_aboutPage', name='link_aboutPage'), ... # > > > > also fails with "name='proyName.link_aboutPage'" > > > > # in the template (about.html): > > > > ... <a href="{% url packages.appName.views.link_aboutPage%}">show > > > > 'about'<a> ... > > > > > by the way, the view loks like: > > > > # in proyName.packages.appName.views.py: > > > > ... > > > > def view_aboutPage(request): > > > > return render_to_response('pages/about.html', > > > > context_instance=RequestContext(request)) > > > > ... > > > > > what can i do?? honestly, i do not know... > > > > thanks! > > > > > On Apr 29, 12:37 pm, Kevin Audleman <kevin.audle...@gmail.com> wrote: > > > > > > 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 'proyName.view_aboutPage' with arguments '()' and keyword > > > > > arguments '{}' not found." > > > > > > I have solved most of my URL problems this way. > > > > > > Cheers, > > > > > Kevin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---