i have a problem with my urls it keeps breaking

here is my url















*from django.conf.urls import patterns, include, urlfrom django.contrib 
import adminadmin.autodiscover()#from blogs import viewsurlpatterns = 
patterns('blogs.views',    url(r'^admin/', include(admin.site.urls)),    ## 
news updates    url(r'^blogs/', 
include('blogs.urls')),                           url(r'^blogs/$', 
'news_list'),    url(r'^blogs/(?P<blog_id>\d+)/$', 'news_detail'),  This 
second url is not executing which i cant understand why   )*

when i type on the browser 127.0.0.1:8000/blogs it give me the links to the 
list of blogs title which i inputed in the admin area.

when i now click on the links for it to out put the blog content it breaks 
and keeps giving me this error.











*Page not found (404)Request Method:    GETRequest URL:    
http://127.0.0.1:8000/blogs//Using the URLconf defined in BP.urls, Django 
tried these URL patterns, in this order:^admin/^blogs/ ^blogs/$^blogs/ 
^blogs/(?P<blog_id>\d+)/$^blogs/$^blogs/(?P<blog_id>\d+)/$The current URL, 
blogs//, didn't match any of these.You're seeing this error because you 
have DEBUG = True in your Django settings file. Chang*




here are the views for the two urls














*def news_list(request):    news= Post.objects.order_by('-pub_date')[:5]    
template = loader.get_template('index.html')    context = 
RequestContext(request, {        'news': news,    })    return 
HttpResponse(template.render(context))def news_detail(request, blog_id):    
post = Post.objects.get(slug=blog_id)    context = {'post', post}    return 
render_to_response('news_details.html', context, 
context_instance=RequestContext(request))*
    

Please i need some help

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/a0bfa67f-4f67-4d37-b2e4-8d56424b27b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to