Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 April 29, 2009 02:06:15

Julián C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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:
# template.html
...
<a href="{% url view_aboutPage %}">a link to the 'about' page<a>
...

i have a general urls.py file who looks like:
# proyName/urls.py
...
url(r'^/', include('proyName.package.appName.urls')),
...
where appName includes the 'view_aboutPage' view in its views.py
'package' it's just a folder to wrap up all the available apps

and also i have a urls.py file in appName, and it is:
# proyName/package/appName/urls.py
...
url(r'^about/$', 'view_aboutPage', name='view_aboutPage'),
...

please... help!
what is it wrong in there??
thank u all
bye!
--~--~---------~--~----~------------~-------~--~----~
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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#2 April 29, 2009 04:37:15

T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 <jcp...@gmail.com> 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: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:
> # template.html
> ...
> <a href="{% url view_aboutPage %}">a link to the 'about' page<a>
> ...
>
> i have a general urls.py file who looks like:
> # proyName/urls.py
> ...
> url(r'^/', include('proyName.package.appName.urls')),
> ...
> where appName includes the 'view_aboutPage' view in its views.py
> 'package' it's just a folder to wrap up all the available apps
>
> and also i have a urls.py file in appName, and it is:
> # proyName/package/appName/urls.py
> ...
> url(r'^about/$', 'view_aboutPage', name='view_aboutPage'),
> ...
>
> please... help!
> what is it wrong in there??
> thank u all
> bye!
--~--~---------~--~----~------------~-------~--~----~
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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#3 April 29, 2009 11:17:31

Christian B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 <jcp...@gmail.com> 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: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:
> # template.html
> ...
> <a href="{% url view_aboutPage %}">a link to the 'about' page<a>
> ...
>
> i have a general urls.py file who looks like:
> # proyName/urls.py
> ...
> url(r'^/', include('proyName.package.appName.urls')),
> ...
> where appName includes the 'view_aboutPage' view in its views.py
> 'package' it's just a folder to wrap up all the available apps
>
> and also i have a urls.py file in appName, and it is:
> # proyName/package/appName/urls.py
> ...
> url(r'^about/$', 'view_aboutPage', name='view_aboutPage'),
> ...
>
> please... help!
> what is it wrong in there??
> thank u all
> bye!
--~--~---------~--~----~------------~-------~--~----~
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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#4 April 29, 2009 16:10:23

Julián C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 <xeniac...@gmail.com> 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.
>
> On 29 Apr., 03:06, Julián C. Pérez <jcp...@gmail.com> 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: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:
> > # template.html
> > ...
> > <a href="{% url view_aboutPage %}">a link to the 'about' page<a>
> > ...
>
> > i have a general urls.py file who looks like:
> > # proyName/urls.py
> > ...
> > url(r'^/', include('proyName.package.appName.urls')),
> > ...
> > where appName includes the 'view_aboutPage' view in its views.py
> > 'package' it's just a folder to wrap up all the available apps
>
> > and also i have a urls.py file in appName, and it is:
> > # proyName/package/appName/urls.py
> > ...
> > url(r'^about/$', 'view_aboutPage', name='view_aboutPage'),
> > ...
>
> > please... help!
> > what is it wrong in there??
> > thank u all
> > bye!
--~--~---------~--~----~------------~-------~--~----~
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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#5 April 29, 2009 17:54:42

Malcolm T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 test case and open a ticket
(if one doesn't already exist) so that we don't forget to fix it.

Regards,
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
django-users+unsubscr...@googlegroups.com
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#6 April 29, 2009 17:56:08

Malcolm T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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. If you can't use the real string from
your program because it reveals Secret Project Name, then change it to
something else, but check that the something else *still fails*. Reverse
URL resolving is not broken, as a concept. Which means it's something
specific about what you are doing, so the precise details are important.

Regards,
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
django-users+unsubscr...@googlegroups.com
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#7 April 29, 2009 18:29:15

Julián C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


jajaja it's not top secret
what more information should i provide??

On 29 abr, 11:55, Malcolm Tredinnick <malc...@pointy-stick.com> 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 example name
>
> Sounds like you need to provide more accurate information then. Provide
> the actual data that is failing. If you can't use the real string from
> your program because it reveals Secret Project Name, then change it to
> something else, but check that the something else *still fails*. Reverse
> URL resolving is not broken, as a concept. Which means it's something
> specific about what you are doing, so the precise details are important.
>
> Regards,
> 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
django-users+unsubscr...@googlegroups.com
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#8 April 29, 2009 18:37:16

Kevin A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#9 April 30, 2009 03:52:58

Julián C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#10 April 30, 2009 15:20:23

Julián C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

url template tag help


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 athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

Board footer

Moderator control

Enjoy the 24th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support