miratcan / qhonuskan-votes

Simple reddit like voting system without usage off GenericForeignKeys. Built for linkfloyd project.
Other
30 stars 11 forks source link

Class 'Post' has no 'objetcs' member #26

Closed morbanjunior closed 4 years ago

morbanjunior commented 6 years ago

Hello I trying to make a blog but, I have the next error.

Error E1101

[pylint] E1101:Class 'Post' has no 'objetcs' member class Post(*args, **kwargs) class Post

this is my view: from django.shortcuts import render from django.http import HttpResponse from .models import Post as po def index(request):

return HttpResponse('Hello From Posts')

post= po.objetcs.all()[:10]
    context={
   'title':'Latest Posts',
   'posts': post
}
return render(request, 'post/index.html',context)

and this is my Model:

from django.db import models from datetime import datetime class Post(models.Model): title=models.CharField(max_length=200) body=models.TextField() created_at=models.DateTimeField(default=datetime.now, blank=True) def str(self): return self.title

I dont now what going on, can someone tell me what is the problem? Thanks.

morbanjunior commented 6 years ago

I reset my server 6 time and now it is working .