Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small bug #6

Open
iplitharas opened this issue Apr 12, 2020 · 2 comments
Open

small bug #6

iplitharas opened this issue Apr 12, 2020 · 2 comments

Comments

@iplitharas
Copy link

Hello,
This is a class attribute it's going to be initialized with the latest queries at compiled/running time and in that case when we update/delete something we need to restart the server to have the latest results from the model.
In any case, thank you a lot for this tutorial it's very helpful

queryset = Course.objects.all()

@2mxd
Copy link

2mxd commented Aug 7, 2021

`
def get_queryset(self):
return self.queryset

def get(self, request, *args, **kwargs):
    context = {'object_list': self.get_queryset().all()}
    return render(request, self.template_name, context)`

That is ok.

@smallmacro
Copy link

Thanks. It really helps fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants