Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7732721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:48:06+00:00 2026-06-01T06:48:06+00:00

I am using the method described in this question to load intial users for

  • 0

I am using the method described in this question to load intial users for my django project.

This saves user permissions, where one permission record might look like this:

{
"pk": 56, 
"model": "auth.permission", 
"fields": {
  "codename": "change_somemodel", 
  "name": "Can change some model", 
  "content_type": 19
}

And a user record:

{
"pk": 2, 
"model": "auth.user", 
"fields": {
  "username": "some_user", 
  "first_name": "", 
  "last_name": "", 
  "is_active": true, 
  "is_superuser": false, 
  "is_staff": true, 
  "last_login": "2011-09-20 06:36:54", 
  "groups": [], 
  "user_permissions": [
    10, 
    11, 
    19, 
    20, 
    21, 
    1, 
    2, 
    56,
    ...,
  ], 
  "password": "sha1$e4f29$fcec7f8bb930d98abdaaa3c0020220f413c4c1f5", 
  "email": "", 
  "date_joined": "2011-03-15 06:01:41"
}

Is there any potential for the content type foreign key to change on a future installation? How about if models or apps added? For example, let’s say I add a model to my core app, then I have some reusable apps which are listed after that in settings.py, will those have a different content_type_id on a new installation? Can I include the content_type table in my initial data, or is that likely to cause other issues?

If this isn’t a reliable method to load multiple initial users into the database, what are the alternatives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:48:07+00:00Added an answer on June 1, 2026 at 6:48 am

    Check Natural Keys
    . Use -n w/ dumpdata, like ./manage.py dumpdata -n auth.User

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the method described by Josh in this question to add a toolbar
Using the method described in this question , I can get a list of
I have organised my junit tests using one inner class per method as described:
I'm using an invocation described in this question: Synchronization accross threads / atomic checks?
I've done scaffolding using the method described here http://wiki.rubyonrails.org/rails/pages/ScaffoldGenerator However, I want to know
when using this method public List<Field> getFieldWithoutId(List<Integer> idSections) throws Exception { try { Connection
By using LoadControl method. Is it on Page Load or on Page PreInit? and
Should I be using this method of throwing errors: if (isset($this->dbfields[$var])) { return $this->dbfields[$var];
I've written an application which allows audio fingerprinting using the method described here .
Why does this init method return an object out of scope? Using XCode 4.2,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.