Skip to content
Snippets Groups Projects
Commit a2cc5498 authored by Nadja Geisler's avatar Nadja Geisler :sunny: Committed by Benjamin Hättasch
Browse files

introduce virtual rooms

parent 63a7291f
No related branches found
No related tags found
No related merge requests found
# Register your models here.
from django.contrib import admin
from AKModel.admin import RoomAdmin
from AKOnline.models import VirtualRoom
@admin.register(VirtualRoom)
class VirtualRoomAdmin(RoomAdmin):
model = VirtualRoom
# Generated by Django 3.0.6 on 2020-05-17 20:02
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('AKModel', '0033_AKOnline'),
]
operations = [
migrations.CreateModel(
name='VirtualRoom',
fields=[
('room_ptr',
models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True,
primary_key=True, serialize=False, to='AKModel.Room')),
('url', models.URLField(blank=True, help_text='URL to the room or server', verbose_name='URL')),
],
options={
'verbose_name': 'Virtual Room',
'verbose_name_plural': 'Virtual Rooms',
},
bases=('AKModel.room',),
),
]
# Create your models here.
from django.db import models
from django.utils.translation import gettext_lazy as _
from AKModel.models import Event, Room
class VirtualRoom(Room):
""" A virtual room where an AK can be held.
"""
url = models.URLField(verbose_name=_("URL"), help_text=_("URL to the room or server"), blank=True)
class Meta:
verbose_name = _('Virtual Room')
verbose_name_plural = _('Virtual Rooms')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment