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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:22:26+00:00 2026-06-17T23:22:26+00:00

So first let me describe what I am attempting to do. I have an

  • 0

So first let me describe what I am attempting to do. I have an User model, a User Profile model and a Job model. I need to be able to list all jobs associated with a user and I need to show which user is associated with a job. This is what I am thinking, please let me know if i am in the right direction.`

class Job(models.Model):
    title=models.CharField(max_length=30,blank=False)
    description=models.TextField(blank=False)
     ...........................


class UsersJob(models.Model):
    user=models.OneToOneField('User')
    jobs=models.Foreignkey('Job')

Would it be better to connect jobs to the User object or the User profile as defined under AUTH_PROFILE_MODULE. Also am i in the right direction with what i am trying to get done

  • 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-17T23:22:28+00:00Added an answer on June 17, 2026 at 11:22 pm

    This completely depends on the type of relationship you need.

    • If there is 1 job per user, then by all means put a field on Job or User that points to its target.
    • If there’s a many-job-to-single-user relationship, add a foreign key to the Job model.
    • If there’s a many job to many user relationship, add an m2m field on either.
    • If there’s a many user to single job relationship, put the foreignkey on your user model (each user has 1 job, max).

    AUTH_PROFILE_MODULE ?

    You would under most circumstances not want to point any FKs to this Profile table, because django works pretty tightly with the User model and you are more likely to have access to a list of Users than UserProfiles from which to query Jobs or whatever other relationship.

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

Sidebar

Related Questions

Let me first describe my situation. I have a list of Hex values, which
Let me first describe my goal: I have created an object with 3 properties:
Thanks for viewing my question. Let me describe the app first. I have a
Let me first describe the problem. I have this application that opens a word
I have the following test block in rspec: describe for signed-in users do let(:user)
Let me describe my situation first: I have a blog website, where the blog
Let me describe my problem first. I have a class which holds a NSMutableDictionary
I've got a strange problem. Let me first describe my situation: Webserver01 (Webapplication, SQL,
First let me say I have read this useful article thoroughly and am using
First let me explain. I have several addresses on the page that I put

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.