Comments (7)
Thanks for the suggestion @foxx
Have you looked into making https://github.com/MongoEngine/django-mongoengine/tree/master better support Django + Mongo?
from django-mongoengine.
I'd had a look a few months ago, but wasn't keen on the approach used, and ended up making my own lightweight version as linked.
For example, handling setup/teardown of unittest data is done inside MongoTestCase, but this isn't the best way of doing things. It requires the user to inherit their unit test directly from that class, which is an unclean pattern. It would be slightly better if it worked as a mix-in, which would most likely need to contain some nasty MRO magic, but even then it still wouldn't be a great approach, for much the same reasons.
This also requires you to use MONGODB_DATABASES
rather than just specifying the database inside DATABASES
with a mongoengine
engine string, which again feels unclean.
Both of these features could probably be merged without too much problem, although it would require a lot of testing as monkey patching could cause some weird edge cases. These changes would, naturally, be backwards incompatible for most people too.
I'm not sure if it would break the other elements such as forms/admin, I personally have no use for them as all my use cases for Mongo involve multi layer documents. The forms abstraction for Django is just not designed well for deep document resources, even with the support of EmbeddedFormField (in my own opinion), but this is a design fault with Django, not django-mongoengine
.
from django-mongoengine.
@foxx : We can use https://github.com/hspandher/django-test-addons which provides the setup and teardown functionality after run of each test case.
I also have concern here, How are we running the test cases here? I am trying to use pytest, will it be usable?
from django-mongoengine.
So far, @foxx killed his repository.
Is the functionality merged into this project?
from django-mongoengine.
I have since stopped using Django, as I now consider it broken by design. The repo itself was killed because of backwards incompatible changes after the last Django release. I can dig out the code from archive if needed, but it's probably better to do it again from scratch.
from django-mongoengine.
@foxx your blog post "42 awesome tools for programmers" does not mention django in section "Things to avoid". Wouldn't you write something about why django is broken and what do you use instead?
from django-mongoengine.
@qwiglydee I've got something coming out soon that tackles this very topic, stay tuned :)
from django-mongoengine.
Related Issues (20)
- How does the Permission are automatically made in auth module? HOT 1
- get_deleted_objects needs to be changed for admin view HOT 1
- Appconfig models is empty OrderedDict HOT 4
- Too slow with >1K documents! HOT 2
- unable to createsuperuser HOT 1
- Sub query using mongoengine
- fixes for django:3.1 import FieldDoesNotExist
- FieldDoesNotExist import Exception HOT 1
- there are many RemovedInDjango40Warning warnings HOT 2
- something wrong with django_mongoengine/forms/document_options.py HOT 4
- mongo-admin from django_mongoengine not supporting FieldList. Throwing ValidationError for list HOT 3
- Cannot import EMPTY_CHANGELIST_VALUE in django VERSION = (3, 0, 8, 'final', 0) HOT 2
- Is this package still maintained? HOT 1
- Admin pagination seems to be off by one. HOT 2
- Do not recommend djongo in the readme. HOT 1
- Is this project alive? HOT 4
- UI issue HOT 2
- Using list in a "not_contains" query HOT 1
- ModuleNotFoundError: No module named 'typing_extensions' HOT 3
- '_thread._local' object has no attribute 'no_dereferencing_class' for simple querryset HOT 7
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 django-mongoengine.