Comments (3)
We can do on normal query:
Person.query.filter({'first_name' : 'John'}).remove_all()
from flask-mongoalchemy.
I tried with:
Person.query.filter({'first_name' : 'John'}).remove_all()
But get following error message:
TypeError: remove_all() takes at least 2 arguments (1 given)
What am I missing here? Thanks!
from flask-mongoalchemy.
@zqkou it looks like mongoalchemy now requires a qfield on remove_all. A qfield is an instance of mongoalchemy.QueryField: http://www.mongoalchemy.org/api/expressions/update_expressions.html#mongoalchemy.update_expression.UpdateExpression.remove_all
I'm not very familiar with the recent versions of mongoalchemy, but I can try to dig this up later. I'll reopen this issue.
from flask-mongoalchemy.
Related Issues (20)
- Multiple wsgi apps cause BadValue / ObjectID exception HOT 1
- Bug Fix for Book Collections
- Stop using the deprecated flaskext package
- How to use remove()?
- Objects lose attributes?
- Using Connection String URI Format HOT 5
- Incompatible with the latest pymongo HOT 2
- Enable Timezone on driver
- Is writing to the _id field supported? HOT 1
- Connection URI string still requires setting of a DATABASE variable. HOT 1
- Flask-Admin possible?
- Allow setting keyword arguments while initializing MongoAlchemy object.
- How to mock/fake db connection for tests?
- calling append() on a ListField changes the default value HOT 1
- Collection names in LowerCase HOT 1
- Documentation for field types
- Unable to use $near
- How to query document using key
- 'NoneType' object has no attribute 'filter'
- Versioning conflicts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-mongoalchemy.