python manage.py shell
# from notes.models import Notes
# mynote = Notes.objects.get(pk='1')
# mynote.title
# mynote.text
# Notes.objects.all()
# new_note = Notes.objects.create(title="A second note",text="this is a second note")
# Notes.objects.filter(title__startswith="My")
## text__icontains='Django'
# Notes.objects.exclude(text__icontains='Django')
# Notes.objects.filter(text__icontains='Django').exclude(title__icontains='Django')
No comments:
Post a Comment