Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

How do you deal with anonymous users with get_queryset?

Whenever I try to delete when I am not logged in, I get an AnonymousUser is not iterable error. What would be the best way to go about fixing this?

Adding authorisation for the page is the first thing that comes to my mind, but that puts me a bit ahead of myself. Is there a way to handle this in the get_queryset for now?

Thanks