0

I have a project on django 1.4.5 with custom userprofile and fresh installed pybbm as covered in this instructions https://pybbm.readthedocs.org/en/latest/install.html#enable-your-site-profile

in this instructions: "If you have south enabled and use profile class under south control (like ‘pybb.Profile’) profile for superuser will not be created after syncdb/migrate. It will be created during first login of this user to site by pybb.middleware.PybbMiddleware."

but on first superuser login i get: "UserProfile matching query does not exist."

this is full traceback http://dpaste.com/1035237/

i watch
/usr/local/lib/python2.7/dist-packages/pybb/middleware.py in process_request

here:

        if request.user.is_authenticated():
        try:
            # Here we try to load profile, but can get error
            # if user created during syncdb but profile model
            # under south control. (Like pybb.Profile).
            profile = request.user.get_profile()
        except ObjectDoesNotExist:
            # Ok, we should create new profile for this user
            # and grant permissions for add posts
            user_saved(request.user, created=True)
            profile = request.user.get_profile()

but no profile for superuser created.

how to fix problem?

4

1 に答える 1

0

settings.py で「pybb.middleware.PybbMiddleware」が有効になっていることを確認してください

于 2013-03-28T12:28:43.760 に答える