url help

59 views
Skip to first unread message

ashley kenney

unread,
Oct 2, 2014, 6:32:41 PM10/2/14
to django...@googlegroups.com
hello sweets!!!

I'm trying to display about page under rango app in my tango project.  I'm getting error below when I go to http://127.0.0.1:8000/rango/about.  Not sure what is wrong with   (r'^about/', 'rango.views.about'),,.  help.

Not Found
The requested URL /rango/about was not found on this server.



My rango/urls.py

from django.conf.urls import patterns, url
from rango import views

urlpatterns = patterns('',
        url(r'^$', views.index, name='index'),
            (r'^about/', 'rango.views.about'),


)


My structure and following this exercise 3.7 at http://www.tangowithdjango.com/book/chapters/setup.html#mapping-urls

tango
>>rango
>>>migration
>>>>_init_.py
>>>>admin.py
>>>>models.py
>>>>tests.py
>>>>urls.py
>>>>views.py
>>tango
>>>>_init_.py
>>>>settings.py
>>>>urls.py
>>>>views.py
>>>>wsgi.py


Lachlan Musicman

unread,
Oct 2, 2014, 8:07:50 PM10/2/14
to django...@googlegroups.com
What's in your tango urls.py?



Cheers
L.
> --
> 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 an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cd26ba42-56b6-4f31-92a2-ea6d6d6ebcd4%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
You have to be really clever to come up with a genuinely dangerous
thought. I am disheartened that people can be clever enough to do that
and not clever enough to do the obvious thing and KEEP THEIR IDIOT
MOUTHS SHUT about it, because it is much more important to sound
intelligent when talking to your friends.
This post was STUPID.
-----------------------------------------------------------------------------------------------------------
The Most Terrifying Thought Experiment of All Time
http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html

ashley kenney

unread,
Oct 2, 2014, 10:39:13 PM10/2/14
to django...@googlegroups.com

my tango/urls.py

from django.conf.urls import patterns, include, url
from django.contrib import admin

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'tango.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
        (r'^rango/$', include('rango.urls')),
        (r'^$', 'tango.views.index'),
)





thanks ;)

Collin Anderson

unread,
Oct 2, 2014, 10:50:17 PM10/2/14
to django...@googlegroups.com
 (r'^rango/$', include('rango.urls')),
remove the dollar sign.
 (r'^rango/', include('rango.urls')),

Lachlan Musicman

unread,
Oct 2, 2014, 10:56:56 PM10/2/14
to django...@googlegroups.com
Yep that. The $ sign indicates "this is the end of the url".

(actually, it's a generic regex that means "this is the end of the
search string" in the same way that ^ indicates "this is the start of
the search string".)

Cheers
L.
> --
> 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 an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7187b155-b14e-4412-8552-f0829e69aaca%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages