why i m getting this
error  :-type object 'Story' has no attribute 'object'


this is my views.py file:

from django.shortcuts import render,render_to_response
from django.http import HttpResponseRedirect
from django.template import RequestContext
from .models import *
from django.http import HttpResponse,HttpRequest
# Create your views here.



def home(request):

    story = Story.object.all()
    return render_to_response('show.html',{'story':story})


this is my models.py file:

from django.db import models
from django.forms import ModelForm;
# Create your models here.

class Story(models.Model):
    stories = models.CharField(max_length=1024)


class storyform(ModelForm):
    class Meta:
        model = Story
        fields = ['stories']



-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/711b4bc2-c974-46f7-a88b-d90ad561d92f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to