mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
Updating example plugin zip file, python3 is default utf8
and added in pre/post examples
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<cyberpanelPluginConfig>
|
<cyberpanelPluginConfig>
|
||||||
<name>examplePlugin</name>
|
<name>examplePlugin</name>
|
||||||
<type>plugin</type>
|
<type>plugin</type>
|
||||||
<description>This is an example plugin</description>
|
<description>This is an example plugin</description>
|
||||||
<version>0</version>
|
<version>0</version>
|
||||||
</cyberpanelPluginConfig>
|
</cyberpanelPluginConfig>
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
|
|||||||
4
examplePlugin/post_install
Normal file
4
examplePlugin/post_install
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/local/CyberCP/bin/python
|
||||||
|
RESET='\033[0;0m'
|
||||||
|
BLUE="\033[0;34m"
|
||||||
|
print(BLUE + "Running Post-Install Script..." + RESET)
|
||||||
4
examplePlugin/pre_install
Normal file
4
examplePlugin/pre_install
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/local/CyberCP/bin/python
|
||||||
|
RESET='\033[0;0m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
print(GREEN + "Running Pre-Install Script..." + RESET)
|
||||||
@@ -3,6 +3,7 @@ from django.http import HttpResponse
|
|||||||
from websiteFunctions.signals import postWebsiteDeletion
|
from websiteFunctions.signals import postWebsiteDeletion
|
||||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||||
|
|
||||||
|
|
||||||
# This plugin respond to an event after CyberPanel core finished deleting a website.
|
# 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.
|
# Original request object is passed, body can be accessed with request.body.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
# Create your tests here.
|
# Create your tests here.
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ from django.conf.urls import url
|
|||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
|
||||||
url(r'^$', views.examplePlugin, name='examplePlugin'),
|
url(r'^$', views.examplePlugin, name='examplePlugin'),
|
||||||
]
|
]
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
from django.shortcuts import render, HttpResponse
|
from django.shortcuts import render, HttpResponse
|
||||||
|
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
def examplePlugin(request):
|
def examplePlugin(request):
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user