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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:13:54+00:00 2026-06-05T19:13:54+00:00

I would like to design a model for an online private school in Django.

  • 0

I would like to design a model for an online private school in Django. It focuses on relation among Students, Tutors and Courses.

The most important factor that should be considered is that Students can add and Tutors can create courses.

I’d like to extend built-in Djano’s “User” and extend its functionality.

I have designed a very draft model like this:

from django.db import models
from django.contrib.auth.models import User , Group
from django.utils.translation import ugettext as _


class Course(models.Model):
    name = models.CharField(max_length = 70)
    slug = models.SlugField()
    created = models.DateTimeField(auto_now = True)
    updated = models.DateTimeField(auto_now_add = True)
    description = models.TextField()
    student = models.ManyToManyField('Student' , null = True, blank = True, related_name = _('Student courses'))
    tutor = models.ManyToManyField('Tutor' , null = True, blank = True , related_name = _('Tutor courses'))


    def __unicode__(self):
        return self.name

    class Meta:
        verbose_name = ('course')
        verbose_name_plural = ('courses')


class Student(models.Model):
    user = models.ForeignKey(User , blank = True)
    #photo = models.ImageField(_('photo'), upload_to='photos/', blank=True)



class Tutor(models.Model):
    user = models.ForeignKey(User , blank = True)
    #photo = models.ImageField(_('photo'), upload_to='photos/', blank=True)

First of all: is it a correct approach? I’d like to have User, so I can use it in View and Template layers.

Second, how can I query that which student has got which courses?

Thank you beforehand ..

  • 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-05T19:13:56+00:00Added an answer on June 5, 2026 at 7:13 pm

    Rather than have a Student and Tutor model I would look at using the user profiles supported by Django. Also the auth module has a fairly complete permissions model, that you could use instead of creating your own system to allow only some users to create courses.

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

Sidebar

Related Questions

I would like to design a class template which takes an allocator type (as
I would like to design Tab Bar at bottom in HoneyComb Tablet. So, is
I would like some sugestion on how to design a table that gets like
I have an UserControl and would like to hide the resizing handles in design-time,
I have to design a GUI using Qt. I would like to draw multiple
We need to design a secure web application. I would like to propose a
We are in the process of nutting out the design guidelines we would like
I have this design which I cannot seem to get right, I would like
I'm having a simple test design problem, which I would like to solve once
I'm trying to design a simple Cocoa application and I would like to have

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.