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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:19:03+00:00 2026-05-21T04:19:03+00:00

Greetings, I’m sure there is a simple solution to what I’m trying to do

  • 0

Greetings,
I’m sure there is a simple solution to what I’m trying to do but unfortunately I wasn’t able to find it in the documentation.

I have the following model (simplified version shown):

models.py:

class Student(models.Model):
  student_id = models.IntegerField(primary_key=True, unique=True,
      db_index=True, max_length=9)
  first_name = models.CharField(max_length=50)
  last_name  = models.CharField(max_length=50)

  def __unicode__(self):
    return u"%s %s" % (self.first_name, self.last_name)

class Course(models.Model):
  course_id = models.AutoField(primary_key=True, unique=True,
                              db_index=True, max_length=4)
  title = models.CharField(max_length=50)
  dept = models.CharField(max_length=6)
  number = models.IntegerField(max_length=5)
  student_id = models.ManyToManyField(Student, blank=True)

  def __unicode__(self):
    return u"%s %s" % (self.dept, self.number)

What I wanted was to be able to add students to multiple classes in the admin interface similar to the way that I can add students in the classes admin interface. If there is yet another way that seems more beneficial I would be interested in that as well.

Thanks in advance for any help!

  • 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-21T04:19:04+00:00Added an answer on May 21, 2026 at 4:19 am

    You can use the inlines in your related model, or this blog post might be of some help.

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

Sidebar

Related Questions

Greetings! I'm trying to have a UIWebView controlled from generated events. Is there a
Greetings Friends, I am trying to overlay the simple 2D game I am developing
Greetings all, Is there any issue in the following logic for allocating 2D array:
Greetings! I am trying to find a way in Java to programmatically enable/disable a
Greetings! I am trying to find a way in Java to programmatically enable/disable a
Greetings I may have imagined this but does anyone know if Last.fm previously used
Greetings, I'm trying to simply display a blank textfield (I know), but it's not
Greetings, I would like to use EF4 but I only have Visual studio 2010
Greetings! I have an XElement object that contains the following: <Root> <SubSections> <SubSection id=A>
Greetings I am trying to find a way to implement view only user group

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.