Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models for sessions and tracks #9124

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added custom_sessions/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions custom_sessions/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions custom_sessions/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class CustomSessionsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'custom_sessions'
48 changes: 48 additions & 0 deletions custom_sessions/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
from django.db import models
from events.models import Event
from microlocation.models import Microlocation
from session_types.models import SessionType
from tracks.models import Track
from users.models import CustomUser

class CustomSession(models.Model):
title = models.CharField(max_length=2147483647)
subtitle = models.CharField(max_length=2147483647, null=True, blank=True)
short_abstract = models.TextField(null=True, blank=True)
long_abstract = models.TextField(null=True, blank=True)
comments = models.TextField(null=True, blank=True)
starts_at = models.DateTimeField(null=True, blank=True)
ends_at = models.DateTimeField(null=True, blank=True)
track = models.ForeignKey(Track, on_delete=models.CASCADE, null=True, blank=True)
language = models.CharField(max_length=2147483647, null=True, blank=True)
microlocation = models.ForeignKey(Microlocation, on_delete=models.CASCADE, null=True, blank=True)
session_type = models.ForeignKey(SessionType, on_delete=models.CASCADE, null=True, blank=True)
slides_url = models.CharField(max_length=2147483647, null=True, blank=True)
video_url = models.CharField(max_length=2147483647, null=True, blank=True)
audio_url = models.CharField(max_length=2147483647, null=True, blank=True)
signup_url = models.CharField(max_length=2147483647, null=True, blank=True)
event = models.ForeignKey(Event, on_delete=models.SET_NULL, null=True, blank=True, db_index=True)
state = models.CharField(max_length=2147483647, null=True, blank=True, db_index=True)
created_at = models.DateTimeField(null=True, blank=True)
deleted_at = models.DateTimeField(null=True, blank=True)
submitted_at = models.DateTimeField(null=True, blank=True)
submission_modifier = models.CharField(max_length=2147483647, null=True, blank=True)
is_mail_sent = models.BooleanField(null=True, blank=True)
level = models.CharField(max_length=2147483647, null=True, blank=True)
creator = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, blank=True)
last_modified_at = models.DateTimeField(null=True, blank=True)
send_email = models.BooleanField(null=True, blank=True)
is_locked = models.BooleanField(default=False)
complex_field_values = models.JSONField(null=True, blank=True)
average_rating = models.FloatField(default=0)
rating_count = models.IntegerField(default=0)
facebook = models.CharField(max_length=2147483647, null=True, blank=True)
github = models.CharField(max_length=2147483647, null=True, blank=True)
gitlab = models.CharField(max_length=2147483647, null=True, blank=True)
instagram = models.CharField(max_length=2147483647, null=True, blank=True)
linkedin = models.CharField(max_length=2147483647, null=True, blank=True)
twitter = models.CharField(max_length=2147483647, null=True, blank=True)
website = models.CharField(max_length=2147483647, null=True, blank=True)
favourite_count = models.IntegerField(default=0)
mastodon = models.CharField(max_length=2147483647, null=True, blank=True)
slides = models.JSONField(null=True, blank=True)
3 changes: 3 additions & 0 deletions custom_sessions/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions custom_sessions/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Binary file added session_types/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file added session_types/__pycache__/models.cpython-310.pyc
Binary file not shown.
Empty file added session_types/admin.py
Empty file.
6 changes: 6 additions & 0 deletions session_types/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class SessionTypesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'session_types'
9 changes: 9 additions & 0 deletions session_types/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.db import models
from events.models import Event

class SessionType(models.Model):
name = models.CharField(max_length=2147483647)
length = models.CharField(max_length=2147483647)
event = models.ForeignKey(Event, on_delete=models.CASCADE, null=True, blank=True)
deleted_at = models.DateTimeField(null=True, blank=True)
position = models.IntegerField(null=True, blank=True)
Empty file added session_types/tests.py
Empty file.
Empty file added session_types/views.py
Empty file.
Binary file added tracks/__pycache__/admin.cpython-310.pyc
Binary file not shown.
Binary file added tracks/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file added tracks/__pycache__/models.cpython-310.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions tracks/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions tracks/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class TracksConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'tracks'
10 changes: 10 additions & 0 deletions tracks/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.db import models
from events.models import Event

class Track(models.Model):
name = models.CharField(max_length=2147483647)
description = models.TextField(null=True, blank=True)
color = models.CharField(max_length=2147483647)
event = models.ForeignKey(Event, on_delete=models.CASCADE, null=True, blank=True)
deleted_at = models.DateTimeField(null=True, blank=True)
position = models.IntegerField(null=True, blank=True)
Empty file added tracks/tests.py
Empty file.
3 changes: 3 additions & 0 deletions tracks/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.