Skip to content

Conversation

@AfiMaameDufie
Copy link

I added the python solutions to the CRUD operations lab.

@AfiMaameDufie AfiMaameDufie changed the title Add python solutions to CRUD workshop Add python solutions to CRUD lab Nov 24, 2025
@AfiMaameDufie AfiMaameDufie changed the title Add python solutions to CRUD lab Add python solutions to CRUD workshop challenges Nov 24, 2025
Copy link
Contributor

@dfreniche dfreniche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, but some changes are needed, please review. Thanks!

<TabItem value="python" label="Python">
<div>
```python
books_with_more_than_300_pages = books.find({"pages": {"$gt": 300}})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the spaces at the start of each line in this snippet, copying and pasting fails

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Diego! On it.

Copy link
Author

@AfiMaameDufie AfiMaameDufie Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this many ways in the IDE. This will work for the other part however, after the dictionary, it will add an indent because it was nested.

<TabItem value="python" label="Python">
<div>
```python
reviews = db.collection("reviews")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is failing on me... but this works:

reviews = db["reviews"]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies - forgot reviews is a collection.

<TabItem value="python" label="Python">
<div>
```python
reviews = db.collection("reviews")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here, this works reviews = db["reviews"]

<TabItem value="python" label="Python">
<div>
```python
reviews = db.collection("books")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants