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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:54:17+00:00 2026-05-26T12:54:17+00:00

I am working on a web-app using Django 1.3 and Python2.6. I have to

  • 0

I am working on a web-app using Django 1.3 and Python2.6. I have to extend the Django User model such that there are three types of users and manage permissions for each type.

To elucidate, say there are three types of Users: Faculty, TAs and Students. TAs will be able to create a new ‘Assignment’, Faculty will be able to ‘review’ and confirm it, Students ‘submit’ Solutions, which Faculty will have to ‘review’ and TAs finally can check those ‘reviewed’ Solutions. Now there are three types of users: TAs who can create Assigments and grade Solutions, Faculty who can review Assignments and Solutions to confirm them, and Students who can submit Solutions.

Now, I understand that there are two ways to extend a User model. I can create a UserProfile and add a field called ‘user_type‘. Other way is to subclass the User model. I think sub-classing is a better approach coz there are fields which vary for different type of users.

I will have a single login form, but can have different registration forms for different types of users. Why would you choose either of the approaches?

I understand that the best way to manage permissions for different types of users is through User Groups. How to create groups, check if the user belongs to a group? Does the choice of how to extend the User model effect the way I manage permissions?

  • 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-26T12:54:18+00:00Added an answer on May 26, 2026 at 12:54 pm

    If you create a subclass, the main class will be instantiated automatically, so it’s more convenient. If you make a profile class, you’ll need to instantiate manually both of the classes.

    For simple cases you might need to just check the user type before allowing actions. You may use the buildt-in permissions backends of Django.

    Whether you subclass or make a profile class, does not affect much the groups workflow. There will always be a ManyToMany relation between groups and users. But it’s better to make it between User and Group classes than, say, between UserProfile and Group.

    If you plan a bigger project, I can give a brief description of what a permission framework has to define:

    • subject (the user or group trying to create, access or edit something)
    • object (the target of the action)
    • owner (the owner of the object)
    • role (the relationship between the subject and the object or the object’s owner)
    • permission (the rule defining what roles are allowed to do what actions)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Visual Studio 2008 and VB.Net: I have a working web app that uses
I've been working on a web app using Django, and I'm curious if there
I am working on a web app using C# and asp.net I have been
I am working on an iPhone Web App using HTML & CSS. I have
I have been working on a small web app using the Stripes framework. Now
Im working on an web app using c#. I have in my code the
I'm working on a web app that works fine inside the LAN using HTTP
I'm working on a web app that inventories your home items. I'm 90% there
Web app I'm working on generates HTML using Velocity templates. Problem is that using
i'm currently working in a web app and i'm using django-jquery, and when i

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.