Oh.
Boy do I feel stupid.
Thanks for all your help. I'll try to be less careless next time.
On Oct 22, 8:43 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2008-10-21 at 23:33 -0700, guruyaya wrote:
> > This is actually worse
>
> You mean top-posting? Yes, it's a terrible habit and
On Tue, 2008-10-21 at 23:33 -0700, guruyaya wrote:
> This is actually worse
You mean top-posting? Yes, it's a terrible habit and you should stop
doing it.
>
> blog/models.py
>
> from django.shortcuts import render_to_response as RenderToResponse
> from myblog.blog.models
Sorry if it appears twice. My message seem to have vanished.
What I said was that this is even worse
blog/views.py
--
from django.shortcuts import render_to_response as RenderToResponse
from myblog.blog.models import Post
def listposts(request):
a = Post.objects.all()
This is actually worse
blog/models.py
from django.shortcuts import render_to_response as RenderToResponse
from myblog.blog.models import Post
def listposts(request):
a = Post.objects.all()
a = list(a)
a[0].title = 'hihi'
a[0].content = 'haha'
On Tue, 2008-10-21 at 22:30 -0700, guruyaya wrote:
[...]
> blog/views.py
> ---
> from django.shortcuts import render_to_response as RenderToResponse
> from myblog.blog.models import Post
> def listposts(request):
> a = Post.objects.all()
> a[0].title = 'hihi'
>
I'm kinda new to django, and python, so I'm probably gonna make myself
look a bit stupid. Here goes anyway:
As a simple django (1.0) project, (using python 2.6) I've decided to
write a blog application. Here it goes:
blog/urls.py
--
from django.conf.urls.defaults import *
6 matches
Mail list logo