Re: urls not maching

2014-07-14 Thread ngangsia akumbo
Thanks guys i actually solved my problem using class based views

To be honest that was all the information i had , i did not hide any 
information.
Thanks Guys


-- 
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/cb06fca6-83ea-43c9-96c9-82df8b6704da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-14 Thread Daniel Roseman
On Monday, 14 July 2014 02:08:24 UTC+1, ngangsia akumbo wrote:
>
>
> Those are actual urls , i am actually still developing this site, so i 
> decided to start with a blog first
>

You *have* to help us help you. Thomas specifically requested that you show 
*exactly* what URL you are requesting. You replied with a single line which 
did not provide this information - and you complain that no-one is helping 
you. We want to help you, but we cannot, because you refuse to provide 
sufficient information.
--
DR.

-- 
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/c6e52b55-51b0-4022-b610-a1eb93a36db7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-13 Thread ngangsia akumbo

Those are actual urls , i am actually still developing this site, so i 
decided to start with a blog first

-- 
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/0a60ab4f-1d47-418e-a263-ab6113bd62b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-13 Thread Thomas Lockhart

On 7/13/14 7:19 AM, ngangsia akumbo wrote:
no am not using two slashes, i just want my block links to output the 
content details but i keep having the error above

i need some help here
You are getting some help here. The details you have provided so far 
seem to indicate that you are providing a URL with two slashes. You will 
need to provide more details to clarify that this is not the case.


Try cut and pasting the actual URL from your client into your next email.

hth

   - Tom



On Sunday, July 13, 2014 12:52:20 PM UTC+1, Jonathan Querubina wrote:

It seems tha you are using blog// (two slashes) on the url. Try blog/


--
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/873f6340-0192-465b-b47b-931e2b9d%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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/53C2CB16.9010706%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-13 Thread ngangsia akumbo
can someone help me with a url that will work?


-- 
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/c5779c26-a6e3-486e-853e-d3111986abd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-13 Thread ngangsia akumbo
no am not using two slashes, i just want my block links to output the 
content details but i keep having the error above
i need some help here

On Sunday, July 13, 2014 12:52:20 PM UTC+1, Jonathan Querubina wrote:
>
> It seems tha you are using blog// (two slashes) on the url. Try blog/
>
>
>

-- 
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/873f6340-0192-465b-b47b-931e2b9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-13 Thread Jonathan Querubina
It seems tha you are using blog// (two slashes) on the url. Try blog/

Sent from my iPhone

> On Jul 13, 2014, at 6:52, ngangsia akumbo  wrote:
> 
> 
> 
> Here is the similar probe
> 
> views File
> # Create your views here.
> from blog.models import Post
> from django.shortcuts import render_to_response
> from django.template import RequestContext
> 
> def news_index(request):
> posts = Post.objects.all().order_by('published_date')
> context = {'posts': posts}
> return render_to_response('index.html', context, 
> context_instance=RequestContext(request))
> 
> 
> def news_detail(request, blogslug):
> posts = Post.objects.get(slug=blogslug)
> context = {'posts': posts}
> return render_to_response('news_detail.html', context, 
> context_instance=RequestContext(request))
> 
> Model File
> 
> from django.db import models
> 
> # Create your models here.
> 
> class Reporter(models.Model):
> name = models.CharField(max_length=60, blank=True)
> tell = models.IntegerField(blank=True, null=True)
> location = models.CharField(max_length=50, blank=True, null=True)
> address = models.TextField(max_length=250)
> 
> 
> class Post(models.Model):
> title = models.CharField(max_length=100)
> slug = models.SlugField(unique=True)
> published_date = models.DateTimeField(auto_now_add=True)
> image = models.ImageField(upload_to='static/blog')
> content = models.TextField()
> repoter = models.ForeignKey(Reporter)
> 
> 
> def __unicode__(self):
> return self.title
> 
> PROJECT/URLS
> 
> from django.conf.urls import patterns, include, url
> 
> #enable the admin:
> from django.contrib import admin
> admin.autodiscover()
> 
> urlpatterns = patterns('',
>
> url(r'^blog/', include('blog.urls')),
> url(r'^admin/', include(admin.site.urls)),
> )
> 
> 
> APP/URL
> from django.conf.urls import patterns, url
> from blog import views
> 
> urlpatterns = patterns('',
> 
> url(r'^$', views.news_index, name='news_index'),
> 
> WHEN I TYPE 127.0.0.1:8000/blog it outputs the first url in this file as a 
> series of links.
> url(r'^(?P\d+)/$', views.news_detail, name='news_detail'),
> When i clik on the links this second url breaks down, giving me the error 
> below
> 
> )
> 
> 
> Page not found (404)
> 
> Request Method:   GET
> Request URL:  http://127.0.0.1:8000/blog//
> Using the URLconf defined in rango.urls, Django tried these URL patterns, in 
> this order:
> 
> ^blog/ ^$ [name='news_index']
> ^blog/ ^(?P\d+)/$ [name='news_detail']
> ^admin/
> The current URL, blog//, didn't match any of these.
> 
> You're seeing this error because you have DEBUG = True in your Django 
> settings file. Change that to False, and Django will display a standard 404 pa
> 
> 
> Please i really need help here
> -- 
> 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/e7a715a2-252f-4db7-ad6d-ce1aa721916c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/2C3BF0E3-21B7-48D4-B6A7-9BF83EB7A4DC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-13 Thread ngangsia akumbo


Here is the similar probe

*views File*
















*# Create your views here.from blog.models import Postfrom django.shortcuts 
import render_to_responsefrom django.template import RequestContextdef 
news_index(request):posts = 
Post.objects.all().order_by('published_date')context = {'posts': 
posts}return render_to_response('index.html', context, 
context_instance=RequestContext(request))def news_detail(request, 
blogslug):posts = Post.objects.get(slug=blogslug)context = 
{'posts': posts}return render_to_response('news_detail.html', context, 
context_instance=RequestContext(request))*Model File





















































*from django.db import models# Create your models here.class 
Reporter(models.Model):name = models.CharField(max_length=60, 
blank=True)tell = models.IntegerField(blank=True, null=True)
location = models.CharField(max_length=50, blank=True, null=True)
address = models.TextField(max_length=250)class Post(models.Model):
title = models.CharField(max_length=100)slug = 
models.SlugField(unique=True)published_date = 
models.DateTimeField(auto_now_add=True)image = 
models.ImageField(upload_to='static/blog')content = 
models.TextField()repoter = models.ForeignKey(Reporter)def 
__unicode__(self):return self.titlePROJECT/URLSfrom 
django.conf.urls import patterns, include, url#enable the admin:from 
django.contrib import adminadmin.autodiscover()urlpatterns = 
patterns('',   url(r'^blog/', 
include('blog.urls')),url(r'^admin/', 
include(admin.site.urls)),)APP/URLfrom django.conf.urls import patterns, 
urlfrom blog import viewsurlpatterns = patterns('',url(r'^$', 
views.news_index, name='news_index'),WHEN I TYPE 127.0.0.1:8000/blog it 
outputs the first url in this file as a series of links.
url(r'^(?P\d+)/$', views.news_detail, name='news_detail'),When i 
clik on the links this second url breaks down, giving me the error below)*
Page not found (404)  Request Method: GET  Request URL: 
http://127.0.0.1:8000/blog//  
 
Using the URLconf defined in rango.urls, Django tried these URL patterns, 
in this order: 

   1. ^blog/ ^$ [name='news_index'] 
   2. ^blog/ ^(?P\d+)/$ [name='news_detail'] 
   3. ^admin/ 

The current URL, blog//, didn't match any of these.
 You're seeing this error because you have DEBUG = True in your Django 
settings file. Change that to False, and Django will display a standard 404 
pa


Please i really need help here

-- 
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/e7a715a2-252f-4db7-ad6d-ce1aa721916c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-12 Thread Tom Evans
On Sat, Jul 12, 2014 at 9:01 AM, ngangsia akumbo  wrote:
> i have a problem with my urls it keeps breaking
>
> here is my url
> from django.conf.urls import patterns, include, url
> from django.contrib import admin
> admin.autodiscover()
> #from blogs import views
>
> urlpatterns = patterns('blogs.views',
> url(r'^admin/', include(admin.site.urls)),
> ## news updates
>
> url(r'^blogs/', include('blogs.urls')),

This line says "Anything that starts with "blogs/", refer to the
urlconf in "blogs.urls"

>
> url(r'^blogs/$', 'news_list'),
> url(r'^blogs/(?P\d+)/$', 'news_detail'),  This second url is
> not executing which i cant understand why

These urls start with "blogs/", and are never found because the first
url listed has already taken any request starting with "blogs/".

Either remove the include() line, or move those url()s below it to "blogs.urls".

Cheers

Tom

-- 
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/CAFHbX1KrmP6cfqxs%3DBD_SPFW%2BOzenT0fWiEEWHbfTm0gTsxL-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: urls not maching

2014-07-12 Thread Lachlan Musicman
show slug on the model? how is it defined?

On 12 July 2014 18:01, ngangsia akumbo  wrote:
> i have a problem with my urls it keeps breaking
>
> here is my url
> from django.conf.urls import patterns, include, url
> from django.contrib import admin
> admin.autodiscover()
> #from blogs import views
>
> urlpatterns = 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\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:GET
> Request 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\d+)/$
> ^blogs/$
> ^blogs/(?P\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.



-- 
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
---
Adventure Time http://theholenearthecenteroftheworld.com/

-- 
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/CAGBeqiOvGHeBMAKr576j%3DU0m_qrM-oLDU-K5bc39L699G7UxAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


urls not maching

2014-07-12 Thread ngangsia akumbo
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 updatesurl(r'^blogs/', 
include('blogs.urls')),   url(r'^blogs/$', 
'news_list'),url(r'^blogs/(?P\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\d+)/$^blogs/$^blogs/(?P\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.