Same for me. But it is working fine.

On Wed, Jul 10, 2019 at 4:56 PM Solomon Mbak <[email protected]> wrote:

> I'm a complete novice to python and Django.
>
> I have tried several solutions I found on stack overflow, but I still get
> the same issue. I've tried querying from shell and it works well, but not
> on my code.
>
> I've installed `pylint` using
>
>     pip install pylint-django
>
> I have also changed the Linter settings on Settings > User Settings >
> Python from `pyLint` to `pylint_django` and also to `flake8`, but no
> positive results.
> I still get the message "Class Courses has no 'objects' member
> pylint(no-member)"
>
> These are my codes from models.py:
>
>     class Courses(models.Model):
>     course_title = models.CharField(max_length=200)
>     course_image = models.ImageField(upload_to='course_images/')
>     course_duration = models.TimeField()
>
>      def __str__(self):
>      return self.course_title
>
> The views.py looks like this:
>
>     from django.shortcuts import render
>     from django.http import HttpResponse
>     from .models import Courses
>
>     def homepage(request):
>         cos = Courses.objects.all()
>         context={ 'courses': cos }
>
>         return render(request, "main/home.html", context)
>
> I need help. I'm completely stuck.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/dc769013-524c-46d9-a08f-2e33d2056b97%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dc769013-524c-46d9-a08f-2e33d2056b97%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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/CAEe3PRUsSkmLrt2zfE%3Df%3DnvbT2kJKcv4MFNJjKy4rgYLV6KQfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to