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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:46:06+00:00 2026-06-15T04:46:06+00:00

I have a Django application with following class: class Opinion(models.Model): id = models.AutoField(primary_key=True) contents

  • 0

I have a Django application with following class:

class Opinion(models.Model):
    id = models.AutoField(primary_key=True)
    contents = models.CharField(max_length=256)
    source = models.CharField(max_length=256)
    proArguments = models.ManyToManyField('self', verbose_name="Pro arguments", related_name='proargs', null='true', blank='true')
    contraArguments = models.ManyToManyField('self', verbose_name="Contra arguments", related_name='contraarg', null='true', blank='true')

    def __unicode__(self):
        return self.contents

When I try to create a new instance of this class in the admin, the newly created opinion has one proArgument and one contraArgument, even though I didn’t enter them.

enter image description here

What can I do in order for proargs and contraarg to be empty, when I don’t enter them?

  • 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-15T04:46:07+00:00Added an answer on June 15, 2026 at 4:46 am

    The multiple select widget for both many to many fields contains all possible Opinions. In your screenshot, there are no Opinions selected for these fields. They are not selected until you click on one or more opinions and save.

    You might find the filter_horizontal and filter_vertical model admin options helpful. They make it clearer which objects are selected.

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

Sidebar

Related Questions

I have a django model as following class Project(models.Model) name=models.CharField(max_length=200) class Application(models.Model) proj=models.ForeignKey(Project, null=True,
I have following models relation: class Section(models.Model): section = models.CharField(max_length=200, unique=True) name = models.CharField(max_length=200,
I have following models setup in my Django application class School(models.Model): name = models.TextField()
In a django application I have the following model: class Appointment(models.Model): #some other fields
I'm struggling with the design of a django application. Given the following models: class
I have a django application running under twisted with the following service: class JungoHttpService(internet.TCPServer):
I have the following models: class UserProfile(models.Model): user = models.OneToOneField(User) score = models.PositiveIntegerField() class
Let's assume that I have following models: class ScoutBook(models.Model): troop = models.ForeignKey('Dictionary', limit_choices_to={'type' :
I have a blog-like application with stories and categories: class Category(models.Model): ... class Story(models.Model):
I have following code in my django application. class Status(object): def __init__(self, id, desc):

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.