Skip to content
Snippets Groups Projects
Select Git revision
  • 652ed0a322646eb39ef89334f1eeb84e8d1efa1c
  • main default protected
  • renovate/django-5.x
  • koma/feature/preference-polling-form
4 results

0002_rework_virtual.py

Blame
  • Benjamin Hättasch's avatar
    Benjamin Hättasch authored
    Use One2One relationship instead of inheritance
    This allows to add and also remove the virtual features of a room
    
    Introduce new model
    Create migrations to migrate from existing to new model + a squashed version knowing only about the new model for fresh installations
    Adapt admin views
    Add django-betterforms as dependency to simply create a form allowing to generate rooms with optionally a virtual component in a single view and create that form
    Add view to create rooms in that view and use instead of default django creation form
    Use the new name/structure in templates
    Move RoomForm to forms.py to make imports easier
    Update batch creation of rooms
    
    This resolves #150 and also resolves #179 since now rooms and virtual rooms (rooms with virtual features) are created using the same view
    f894e1a8
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    0002_rework_virtual.py 354 B
    # Generated by Django 4.1.5 on 2023-03-21 23:14
    
    from django.db import migrations
    
    
    class Migration(migrations.Migration):
    
        dependencies = [
            ('AKModel', '0057_upgrades'),
            ('AKOnline', '0001_AKOnline'),
        ]
    
        operations = [
            migrations.RenameModel(
                'VirtualRoom',
                'VirtualRoomOld'
            ),
    
        ]