From 50dfd644e081d3a45a0fc4d49dd8319a40b10917 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 11 Aug 2020 02:13:50 -0400 Subject: [PATCH] Updating example plugin zip file, python3 is default utf8 and added in pre/post examples --- examplePlugin/__init__.py | 2 +- examplePlugin/admin.py | 3 --- examplePlugin/apps.py | 3 --- examplePlugin/meta.xml | 8 ++++---- examplePlugin/models.py | 3 --- examplePlugin/post_install | 4 ++++ examplePlugin/pre_install | 4 ++++ examplePlugin/signals.py | 1 + examplePlugin/tests.py | 3 --- examplePlugin/urls.py | 3 +-- examplePlugin/views.py | 4 +--- pluginInstaller/examplePlugin.zip | Bin 2336 -> 3818 bytes 12 files changed, 16 insertions(+), 22 deletions(-) create mode 100644 examplePlugin/post_install create mode 100644 examplePlugin/pre_install 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 a44c789b9c2e376debb82ad0f7dc56946e548ae6..610d710130708155e1d1fdfcaf59420a68557af1 100755 GIT binary patch literal 3818 zcmbW43pmvI8pr=L3}#$bn2=Fw>0lTJjbziP)G*6189C9SOpL~DP+>QswwO)jayF|v zrwdD$lS?xe97E-!wXBPxV!X9-9r96RxAZ0!9 z7v6xQ2caP~s8&PW=Z<7A(*gX}1%x4j6BNXW;=~69kzx}6L|!G?1>FFlfTX*7(ydx7 zG8k6ohZwCA`rWTLm$JMWmuSt_B6m%Zg{P#sLrIJutX#VvCs^AWoHr0CC*vm|xl{Jk97au#~oO&?q|4)t`k&)RsTnFS8ncxHL{|d0BT6IEoWnZl6(+&q?(wR zxKCpC03p>#F{`u4T6I(n<>Xs+Ti52On)sNkm*`uyx)_hXxoA%tPNuCbA8L-+oOI#% z;?PRZ?#2G+ufK1om@3TA)qr*vs@2>qsVW~N>IXc$5peL!=QbPiM)oURei<37>hHfz z*qZCIy;OY5cB53igF-Mf;t2F%`P02I;*Xor8^|+_=>91$1L>eCOiY`z3hLzUKCJkClLBbdUPn8`?=yNpxQ!Y#py(`ghgxe zXr@a#>F!Js=sX)sA5ja#y~RS>#q^6Id3aj6vx=K-tkW_rL(eTN9Ee59H6eT#Cf{fM zejHpAoDu{XAY{aG!lFWCI^e5NhtzSHDa?Fqt6e)qR7s+hD_4yBo9kVx=AORijdsdi z9LnJmSq?9MAULKxJI3uGOnRSe=&N;n)l$r^N_8&y#b>BSWBJ3yZ`meZg7CJWV;3g1 z?*Hs?F?Dlo%0@$TTS5AK88+kuXMf8+liq=J4Hqbpz$;oUNuGa|8 zSg>VD?RcL6zqw4QVn+#U+$i~hy(>QDh&i^{>8$6`0K*0G$>E~^3L*+rg#P?WTn^)% zxWxWU>%v=CB6?LMjg06s>H~+!hY4;|qjqhDP4A!n*1Zm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