diff --git a/examplePlugin/__init__.py b/examplePlugin/__init__.py index 93ca77eeb..b3f015833 100755 --- a/examplePlugin/__init__.py +++ b/examplePlugin/__init__.py @@ -1 +1 @@ -default_app_config = 'examplePlugin.apps.ExamplepluginConfig' \ No newline at end of file +default_app_config = 'examplePlugin.apps.ExamplepluginConfig' diff --git a/examplePlugin/admin.py b/examplePlugin/admin.py index 4c33e0ec3..8c38f3f3d 100755 --- a/examplePlugin/admin.py +++ b/examplePlugin/admin.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- - - from django.contrib import admin # Register your models here. diff --git a/examplePlugin/apps.py b/examplePlugin/apps.py index dbda5f9af..6f64e3571 100755 --- a/examplePlugin/apps.py +++ b/examplePlugin/apps.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- - - from django.apps import AppConfig diff --git a/examplePlugin/meta.xml b/examplePlugin/meta.xml index 653087d5a..15901e9ac 100755 --- a/examplePlugin/meta.xml +++ b/examplePlugin/meta.xml @@ -1,7 +1,7 @@ - examplePlugin - plugin - This is an example plugin - 0 + examplePlugin + plugin + This is an example plugin + 0 \ No newline at end of file diff --git a/examplePlugin/models.py b/examplePlugin/models.py index 4e6a8e76d..71a836239 100755 --- a/examplePlugin/models.py +++ b/examplePlugin/models.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- - - from django.db import models # Create your models here. diff --git a/examplePlugin/post_install b/examplePlugin/post_install new file mode 100644 index 000000000..c4c6c1c9f --- /dev/null +++ b/examplePlugin/post_install @@ -0,0 +1,4 @@ +#!/usr/local/CyberCP/bin/python +RESET='\033[0;0m' +BLUE="\033[0;34m" +print(BLUE + "Running Post-Install Script..." + RESET) \ No newline at end of file diff --git a/examplePlugin/pre_install b/examplePlugin/pre_install new file mode 100644 index 000000000..6c4fcea9f --- /dev/null +++ b/examplePlugin/pre_install @@ -0,0 +1,4 @@ +#!/usr/local/CyberCP/bin/python +RESET='\033[0;0m' +GREEN='\033[0;32m' +print(GREEN + "Running Pre-Install Script..." + RESET) \ No newline at end of file diff --git a/examplePlugin/signals.py b/examplePlugin/signals.py index 37168d64d..0c4d14f7c 100755 --- a/examplePlugin/signals.py +++ b/examplePlugin/signals.py @@ -3,6 +3,7 @@ from django.http import HttpResponse from websiteFunctions.signals import postWebsiteDeletion from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging + # This plugin respond to an event after CyberPanel core finished deleting a website. # Original request object is passed, body can be accessed with request.body. diff --git a/examplePlugin/tests.py b/examplePlugin/tests.py index f067dcaac..7ce503c2d 100755 --- a/examplePlugin/tests.py +++ b/examplePlugin/tests.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- - - from django.test import TestCase # Create your tests here. diff --git a/examplePlugin/urls.py b/examplePlugin/urls.py index f0c4eea2e..a05d18e24 100755 --- a/examplePlugin/urls.py +++ b/examplePlugin/urls.py @@ -2,6 +2,5 @@ from django.conf.urls import url from . import views urlpatterns = [ - url(r'^$', views.examplePlugin, name='examplePlugin'), -] \ No newline at end of file +] diff --git a/examplePlugin/views.py b/examplePlugin/views.py index d0790aff2..3eba085fb 100755 --- a/examplePlugin/views.py +++ b/examplePlugin/views.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- - - from django.shortcuts import render, HttpResponse + # Create your views here. def examplePlugin(request): diff --git a/pluginInstaller/examplePlugin.zip b/pluginInstaller/examplePlugin.zip index a44c789b9..610d71013 100755 Binary files a/pluginInstaller/examplePlugin.zip and b/pluginInstaller/examplePlugin.zip differ