Skip to content

Can you give a query_set example? #3

@JoshYuJump

Description

@JoshYuJump

As you have given a save() example.

partition_key = _key_for_dt(tweet_data['created_at'])
partition = Tweet.partitions.get_partition(partition_key)
tweet = partition(**tweet_data)
tweet.save()

I'm wonder that is how does the following code execute:
tweet = Tweet.objects.filter(user='Jimmy')
or if there is only one record in Tweet
tweet = Tweet.objects.get(user='Jimmy')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions