jazzband / django-mongonaut

Built from scratch to replicate some of the Django admin functionality and add some more, to serve as an introspective interface for Django and Mongo.
MIT License
240 stars 67 forks source link

"You do not have permissions to access this content." but... how to log in? #64

Closed gwaramadze closed 10 years ago

gwaramadze commented 10 years ago

OK, this may sound noobish but I'm puzzled for two hours straight now, and kindly request help :)

/mongonaut/ url throws 403 accompanied with "You do not have permissions to access this content.". Yet I have no idea how to log in. Here are my files layouts:

# settings.py
from mongoengine import connect
connect('dbname')
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.dummy'
    }
}

AUTHENTICATION_BACKENDS = (
    'mongoengine.django.auth.MongoEngineBackend',
)
AUTH_USER_MODEL = 'mongo_auth.MongoUser'
MONGOENGINE_USER_DOCUMENT = 'mongoengine.django.auth.User'
SESSION_ENGINE = 'mongoengine.django.sessions'
SESSION_SERIALIZER = 'mongoengine.django.sessions.BSONSerializer'

# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'mongoengine.django.mongo_auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'mongonaut',
)

# my full urls.py
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
    url(r'^mongonaut/', include('mongonaut.urls')),
)

I have nothing more, no mongoengine models yet, just want to log in for starters :] manage.py createsuperuser works ok!

Thanks in advance.

pydanny commented 10 years ago

@pythonishvili - Currently, mongonaut needs the database and auth model to be powered by standard SQL based Django models. Hence the problem you've encountered.

I would love to enhance it to not need this kind of backend, but at the moment I have no @MongoDB work lined up. There are a bunch of other features I would like to add, but my open source work is always directed by who is paying the bills. :unamused:

gwaramadze commented 10 years ago

Oh, got it. Thanks!