Code

Opened 7 years ago

Closed 7 years ago

#3161 closed enhancement (invalid)

m2m relationship without intermediary model

Reported by: alej0 Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I think is easier to do something like

class Reporter(models.Model):

first_name = models.CharField(maxlength=30)
last_name = models.CharField(maxlength=30)
position = models.ManyToManyField(Article, position)# with that we can say, here is a m2m relationship with an extra field

class Article(models.Model):

headline = models.CharField(maxlength=100)
pub_date = models.DateField()

it is just a suggestion to make it easier and in a shorter way

the idea is not to code the intermediary model

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by jacob

  • Resolution set to invalid
  • Status changed from new to closed

I can't really see an "action" here, so I don't really think this belongs in the ticket tracker; if you've got an idea to discuss, please take it to django-dev.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.