tangowithcode / tango_with_django_19

A beginners guide to web programming with Python / Django 1.9
Apache License 2.0
207 stars 188 forks source link

Chapter8 Reverse for 'show_category' with arguments.. #61

Open libincla opened 6 years ago

libincla commented 6 years ago

here is my code(btw, i was completed fork by your digital book ) and it occured the error like the bottom

django.core.urlresolvers.NoReverseMatch: Reverse for 'show_category' with arguments '('',)' and keyword arguments '{}' not found. 1 pattern(s) tried: ['rango/category/(?P[\w\-]+)/$']

it confused me three days, i don't know why it happend, and i hope the writer can see it. thanks anyway

leifos commented 6 years ago

hi Libincia, what version of Django are you using?

Also, what is the url that was entered to trigger this error? i.e http://127.0.0.1:8000/rango/category/broken/ ??

L

libincla commented 6 years ago

my django version is : 1.9.10 and i've already followed your django's version and when i added the rango_template_tags.py and rango/cats.html and added the template tags at the head of base.html , e.x

{% block sidebar_block %} {% get_category_list %} {% endblock %}

when i entered http://127.0.0.1:8000/rango/about ==> it occured the error Reverse for 'show_category' with arguments/..

leifos commented 6 years ago

Ok, so it is not the version (as Django 2 changed the package to import for reverse).

Do you have a link to your git repository?

On 17 Apr 2018, at 11:02, libincla notifications@github.com wrote:

my django version is : 1.9.10 and i've already followed your django's version and when i added the rango_template_tags.py and rango/cats.html and added the template tags at the head of base.html , e.x

{% block sidebar_block %} {% get_category_list %} {% endblock %} when i entered http://127.0.0.1:8000/rango/about http://127.0.0.1:8000/rango/about ==> it occured the error Reverse for 'show_category' with arguments/..

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leifos/tango_with_django_19/issues/61#issuecomment-381931289, or mute the thread https://github.com/notifications/unsubscribe-auth/AB02B-BbPJpVUFHrC0Cuypzx0ckZtYJdks5tpb3TgaJpZM4TV0Mn.

libincla commented 6 years ago

i'll push in two days, thanks any way

libincla commented 6 years ago

hi, leifos, sorry for delay , this is the git repo https://github.com/libincla/tango.git btw. my python version is Python 3.6.1 use the virtualenv

SnorlaxYum commented 6 years ago

The same here.