finishing the design of the admin page
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
This commit is contained in:
@@ -72,5 +72,20 @@ class streamingAdmin(ImportExportModelAdmin):
|
||||
|
||||
@admin.register(StreamingRedirectData)
|
||||
class StreamingRedirectAdmin(ImportExportModelAdmin):
|
||||
list_display = ['name','season_to_watch','episode_to_watch','addedDate','url_example','addedDate','alias']
|
||||
fields = ['name','season_to_watch','episode_to_watch','url_example','prefix','infix','suffix','alias','seasonInformation']
|
||||
list_display = ['name','season_to_watch','episode_to_watch','randomViewing','url_example','addedDate','alias']
|
||||
#fields = ['name','season_to_watch','episode_to_watch','url_example','prefix','infix','suffix','alias','randomViewing','seasonInformation']
|
||||
fieldsets = (
|
||||
(
|
||||
'Serie', {
|
||||
'fields': ('name', 'season_to_watch', 'episode_to_watch','randomViewing')
|
||||
}),
|
||||
(
|
||||
'url', {
|
||||
'fields': (('prefix','infix','suffix'),'url_example')
|
||||
}),
|
||||
(
|
||||
'Information', {
|
||||
"classes": ["collapse"],
|
||||
'fields': ('seasonInformation','alias')
|
||||
}),
|
||||
)
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.2.30 on 2026-08-07 15:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('streaming', '0007_rename_streamingdata_streamingsitetestingdata_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='streamingredirectdata',
|
||||
name='randomViewing',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='streamingredirectdata',
|
||||
name='seasonInformation',
|
||||
field=models.JSONField(blank=True, default=dict),
|
||||
),
|
||||
]
|
||||
@@ -27,6 +27,7 @@ class StreamingRedirectData(models.Model):
|
||||
addedDate = models.DateField('Published', blank=True, null=True, auto_now_add=True)
|
||||
alias = models.CharField(max_length=1000, null=True,blank=True)
|
||||
seasonInformation = models.JSONField(default=dict, blank=True)
|
||||
randomViewing = models.BooleanField(default=False)
|
||||
|
||||
def sanitize(self, name):
|
||||
return name.replace(" ", "")
|
||||
|
||||
@@ -35,4 +35,5 @@ def test_website(url_website,bool_proxy=False):
|
||||
except Exception as err:
|
||||
print(f"{type(err).__name__} was raised: {err}")
|
||||
status = "exception not targeted"
|
||||
return status
|
||||
return status
|
||||
|
||||
|
||||
Reference in New Issue
Block a user