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 6542523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:14:17+00:00 2026-05-25T11:14:17+00:00

For some reasons (particularly, to try making DB scheme upgrading easier), I need to

  • 0

For some reasons (particularly, to try making DB scheme upgrading easier), I need to store all the user’s extended properties in another object (like in this question to separate Person and Address)

I have an AUTH_PROFILE_MODULE override set and do capture def_user_profile.

class CustomUser(models.Model):
    user = models.ForeignKey(User, unique=True)

def create_user_profile(sender, instance, created, **kwargs):
    if created:
        CustomUser.objects.create(user=instance)

The question is: if I add a custom type property to CustomUser, like this:

class CustomPropertySet(models.Model):
    this_is_a_Farmer = models.BooleanField()

class CustomUser(models.Model):
    user = models.ForeignKey(User, unique=True)
    extdata = models.CustomProperySet()

Will this automatically create a CustomProperySet entry at adding new user? Does CustomPropertySet needs to be associated back with ForeignKey to its CustomUser owner?
Second question: how to delete extended properties like this when object is deleted?

  • 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-05-25T11:14:18+00:00Added an answer on May 25, 2026 at 11:14 am

    The obvious answer to these is “try it and find out”, but we’re a polite people here…

    • Will it automatically create CustomPropertySet?

    When you assign something to extdata what do you assign? Assigning True and False probably won’t work, you’d have to assign a CustomPropertySet instance, and to get one you’ll have to create one.

    Try it and this will become clear.

    • Does CustomPropertySet need to point back to a CustomUser instance?

    No. The CustomProper t ySet can survive all on it’s lonesome. Your CustomUser points to it, but it’s not bashful and doesn’t care who or how many people point at it.

    • How do delete cascading dependancies?

    See the documentation about cascading deletes

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

Sidebar

Related Questions

I am developing a web application. For some reasons, I need to use external
For some reasons, SSIS is not avalialble. I read about OPENROWSET, but I will
For some reasons, I would like to do an explicit quoting of a string
For some reasons, my will_paginate collection is stuck on page 2. I have the
What are some reasons why PHP would force errors to show, no matter what
What are some reasons why I wouldn't want to disable IIS logging completely for
I'd like to hear some reasons for using a ServerControl opposed to a UserControl.
The HttpModule works fine (hello is replaced with hello world) but for some reasons
I'm trying to use JQuery's autocomplete plug-in but for some reasons Internet Explorer is
I have problem with BWToolkit and XCode. For some reasons Xcode not recognize bwtoolkit

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.