Skip to content

Instantly share code, notes, and snippets.

@vamsipavanmahesh
Created February 4, 2021 05:27
Show Gist options
  • Save vamsipavanmahesh/5bc99f9a7c35ac07f004cb26f6b1c229 to your computer and use it in GitHub Desktop.
Save vamsipavanmahesh/5bc99f9a7c35ac07f004cb26f6b1c229 to your computer and use it in GitHub Desktop.
Few things I felt are:
-> Things are not autoloaded by default.
For example, if we go to shell and want to quickly check something. This can get in the way, you need to know
which app it is in, folder structure etc like below
from polls.models import Choice, Question
-> Folder structure
-> The model.Models seems to be mostly, DIY. For example if you want to inspect an object,
you have override str method like below:
def __str__(self):
return self.question_text
-> Indentation can get in the way, if not careful. IDE should solve this though
Weird API
```
Question.objects.filter(question_text__startswith='What')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment