Skip to content

Commit

Permalink
cleaned models now
Browse files Browse the repository at this point in the history
  • Loading branch information
romer8 committed Mar 25, 2024
1 parent ba185bd commit 9e36396
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 244 deletions.
20 changes: 0 additions & 20 deletions backend/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -1,20 +0,0 @@
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import gettext_lazy as _
from .models import HydroShareResourceList

import logging

logger = logging.getLogger(__name__)


@plugin_pool.register_plugin
class HydroShareResourceListPlugin(CMSPluginBase):
model = HydroShareResourceList
name = _("HydroShare Resource List Plugin")
render_template = "hydroshare_list_resources.html"
cache = False

def render(self, context, instance, placeholder):
context = super().render(context, instance, placeholder)
return context
17 changes: 17 additions & 0 deletions backend/migrations/0032_delete_hydroshareresource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2 on 2024-03-25 21:58

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('cms', '0022_auto_20180620_1551'),
('backend', '0031_auto_20240325_1836'),
]

operations = [
migrations.DeleteModel(
name='HydroShareResource',
),
]
17 changes: 17 additions & 0 deletions backend/migrations/0033_delete_hydroshareresourcelist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2 on 2024-03-25 22:27

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('cms', '0022_auto_20180620_1551'),
('backend', '0032_delete_hydroshareresource'),
]

operations = [
migrations.DeleteModel(
name='HydroShareResourceList',
),
]
18 changes: 0 additions & 18 deletions backend/models.py
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
from cms.models.pluginmodel import CMSPlugin
from django.db import models


import logging

logger = logging.getLogger(__name__)


class HydroShareResourceList(CMSPlugin):
user = models.CharField(max_length=200, default="", blank=True)
password = models.CharField(max_length=200, default="", blank=True)
placeholder_image = models.CharField(
max_length=200, default="https://picsum.photos/200"
)
tags = models.CharField(max_length=200, default="")
updated_version = models.IntegerField(default=0, editable=False)
resources = models.JSONField(editable=False, default=dict)
95 changes: 0 additions & 95 deletions backend/templates/hydroshare_list_resources.html

This file was deleted.

111 changes: 0 additions & 111 deletions backend/templates/hydroshare_resource_template.html

This file was deleted.

0 comments on commit 9e36396

Please sign in to comment.