Comments (15)
djangotoolbox
needs to go after django.contrib.auth
. I think thats all that matters.
from djangotoolbox.
did you find a solution for this?
from djangotoolbox.
This is probably caused by a join. Are you using the builtin user model?
from djangotoolbox.
To provide some more information on this. The builtin user model uses a many-to-many field for permissions. This field requires a join, so it obviously won't work with MongoDB. Take a look at djangotoolbox/admin.py, that shows how to setup the User admin to stop the join from happening.
If you need to use permissions, then you should look at django-nonrel/django-permission-backend-nonrel.
from djangotoolbox.
hi aburgel,
I don't understand why looking at the djangotoolbox/admin.py could show me how to setup the User admin...
anyways, my problem is not really setting up the admin user, but setting up all other users.
All of my users inherit from django's auth.user and thus I have this join issue, and each time I enter the "Users" link in the admin ui I get a :
"DatabaseError at /admin/auth/user/
This query is not supported by the database."
and I thought it's related to your issue.
tnx,
Nitzan
from djangotoolbox.
As I explained, the builtin User model uses a many-to-many field for permissions. This is not supported by mongodb, so you must disable it. djangotoolbox/admin.py will show you how to disable it.
from djangotoolbox.
I understand what you said about the many-to-many field, and that the builtin User model uses it, I just didn't understand the reference to djangotoolbox/admin.py:
should I edit it? should I run it? should it just be there, and it'll take care of everything?
from djangotoolbox.
Is djangotoolbox in your INSTALLED_APPS list? If so, then it should already be working. What djangotoolbox/admin.py does is customize the User admin screen to not show the many-to-many field, so you won't trigger the join.
from djangotoolbox.
Yes, it's in my INSTALLED_APPS, just under django_mongodb_engine..
If I open my project's manage.py shell and do "import djangotoolbox " it doesn't even throw an error.
I wonder what wrong then...
from djangotoolbox.
Hi, Aburgel
Let's put away the auth staff first, focus on djangotoolbox's issue first.
Since djangotoolbox/admin.py has already unregistered the built-in user model and done below
admin.site.unregister(User)
admin.site.unregister(Group)
admin.site.register(User, CustomUserAdmin)
There should have nothing extra we needed to do already.
However, as I first opened this issue, I've already added djangotoolbox
in INSTALLED_APPS
, still found no luck
Could you show steps for a smooth Get Started
guildline for us to followup, thx.
from djangotoolbox.
Hi All,
I am also facing the same issue:
needless to say, i added djangotoolbox to the INSTALLED_APPS
from djangotoolbox.
I just pushed up a fix to the master branch. Give it a try. I tested it with django 1.6, but it should also work with django 1.5. I'm going to close the issue but please reopen if you still have issues.
from djangotoolbox.
Can you submit the order of your INSTALLED_APPS?
from djangotoolbox.
Ok,
Sorry for the mix-up, this is what I wanted to submit:
I'm able to enter the "admin/auth/user/add/", what I couldn't before,
but after submitting the new user I get the following screen:
I'm not sure if it's related to this issue, or I should open a new one, or maybe it's a django-non-rel issue altogether.
When returning to the "admin/auth/user/add/" I can see the users were created.
from djangotoolbox.
I think this is a different issue. If you need help on this, please post in the forums.
from djangotoolbox.
Related Issues (20)
- django.utils.timezone is not available in djangoappengine yet HOT 1
- NoReverseMatch at /admin/auth/user/52ade053f9bed911e71dfa5e/ HOT 1
- Allow Distinct Queries HOT 2
- Nonetype object has no attribute 'model' HOT 1
- Please add documentation HOT 1
- Add ordering by fields in embedded models or dicts
- Support for max_length for ListField and SetField
- Incompatibility with Django 1.7
- python 2 print statement on test files cause exception HOT 1
- Incompatability With Django 1.8 HOT 7
- DatabaseError: Unsupported type for property : <class 'django.utils.safestring.SafeText'> HOT 6
- Bug fix
- No support DateTimeField ? is it be design ?
- Please delete this issue. Unable to remove it.
- This database doesn't support filtering on non-primary key ForeignKey fields.
- RemovedInDjango110Warning: SubfieldBase has been deprecated HOT 3
- No module named from django.utils.importlib import import_module
- importlib issue after installing django 1.11 HOT 5
- DynamicSiteIDMiddleware fails when application when the request.host is an IPv6 address
- Cert errors related to stale docs build
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 djangotoolbox.