Django Quick Reference

Quick Reference


Event.objects.filter(appid=”example”)filter for appid eq example
Event.objects..exclude(username=”rick”)show everything not excluding username eq rick
Event.objects.filter(appid=”example”).exclude(user__in=[“bob”,”fred”])include appid eq example and exclude user bob or fred
Upgrade.objects.filter(device_number=’device_numberooo’).values()Display as dict()

Management Commands

 ./ dumpdata updowngrade –indent 2 

Rick Donato

Want to become a Django expert?

Here is our hand-picked selection of the best courses you can find online:
The Complete Web Development Bootcamp course
Django Practical Guide course
Django Full Stack Developer Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial