adding streaming_redirect
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
2026-08-07 11:56:22 +01:00
parent a991b69547
commit 7a1021edfa
14 changed files with 95 additions and 3 deletions
+1
View File
@@ -4,3 +4,4 @@ from django.apps import AppConfig
class StreamingConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.streaming'
label = 'streaming'
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
@@ -0,0 +1,7 @@
from django.apps import AppConfig
class StreamingRedirectConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.streaming_redirect'
label = 'streaming_redirect'
@@ -0,0 +1,30 @@
# Generated by Django 4.2.30 on 2026-08-07 10:54
import apps.streaming_redirect.models
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='urlData',
fields=[
('name', models.CharField(help_text='Name of the show', max_length=1000, primary_key=True, serialize=False)),
('url_example', models.CharField(help_text='https://www.1shows.org/tv/456-the-simpsons?streaming=true&season=18&episode=5', max_length=1000)),
('prefix', models.CharField(blank=True, help_text='https://www.1shows.org/tv/456-the-simpsons?streaming=true&season=', max_length=1000, null=True)),
('infix', models.CharField(blank=True, help_text='&episode=', max_length=1000, null=True)),
('suffix', models.CharField(blank=True, max_length=1000, null=True)),
('addedDate', models.DateField(auto_now_add=True, null=True, verbose_name='Published')),
('alias', models.CharField(default=apps.streaming_redirect.models.urlData.sanitize, max_length=1000)),
],
options={
'db_table': 'redirectUrl',
},
),
]
@@ -0,0 +1,19 @@
from django.db import models
# Create your models here.
class urlData(models.Model):
def sanitize(self):
print(self)
return 1
name = models.CharField(primary_key=True,max_length=1000, help_text="Name of the show")
url_example = models.CharField(max_length=1000, help_text="https://www.1shows.org/tv/456-the-simpsons?streaming=true&season=18&episode=5")
prefix = models.CharField(max_length=1000, help_text="https://www.1shows.org/tv/456-the-simpsons?streaming=true&season=",blank=True, null=True)
infix = models.CharField(max_length=1000, help_text="&episode=",blank=True, null=True)
suffix = models.CharField(max_length=1000, help_text="" ,blank=True, null=True)
addedDate = models.DateField('Published', blank=True, null=True, auto_now_add=True)
alias = models.CharField(max_length=1000, default=sanitize)
class Meta:
db_table = 'redirectUrl'
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.