pythondjangoeclipsedjango-admindjango-permissions

Django - some permissions are missing in admin tool


I'm not quite sure what to make of this. I'm using Django in eclipse. I made a new django project, and copied the code from a previous django project into this one. I ran syncdb to set up the database. I went to the admin page to recreate my groups, but I noticed that some of the permissions were missing from the list of Available permissions. In the previous project, there was a permission to let me "access" a profile. In this project, that permission isn't on the list, but it's also the permission that I need. Where did it go?


Solution

  • Where did it go?

    When you incrementally change your database by dropping tables and running syncdb, the PK of the application table are reflected in the auth_permission table can change.

    Don't do "incremental" surgery if you can avoid it.

    1. Extract your data.

    2. Drop your database.

    3. Rerun syncdb to rebuild it.

    4. Reload your data.

    You'll be much happier.