Opened 2 years ago

Closed 2 years ago

#33853 closed Uncategorized (invalid)

delete polymorphism basemodel

Reported by: joejoe-am Owned by: nobody
Component: Uncategorized Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

hey all wish have a good day. i have some models like this:

class BaseModel(PolymorphicModel):
    review_average = models.FloatField(default=0.0, verbose_name=_('Review Average'))
    tags = tagulous.models.TagField(to=Tag, blank=True)
    sort = models.IntegerField(default=0, verbose_name=_('Sort'))
class Teacher(BaseModel):
    user_obj = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name=_('User'))
    slider_segment_obj = models.ForeignKey(SliderSegment, null=True, blank=True, on_delete=models.CASCADE, verbose_name=_('Slider Semgent'))
    biography = models.TextField(null=False, blank=False, verbose_name=_('Biography'))

now i want to delete poly base model and transfer records from base model to teachers table.
i cant create new class like NewTeacher because i used many times teacher model in project. any idea how to do this ?

Change History (1)

comment:1 by Mariusz Felisiak, 2 years ago

Resolution: invalid
Status: newclosed

Please don't use Trac as a support channel. Closing per TicketClosingReasons/UseSupportChannels.

Note: See TracTickets for help on using tickets.
Back to Top