diff --git a/examplePlugin/enable_migrations b/examplePlugin/enable_migrations new file mode 100644 index 000000000..e69de29bb diff --git a/examplePlugin/models.py b/examplePlugin/models.py index 71a836239..c2f360a3c 100755 --- a/examplePlugin/models.py +++ b/examplePlugin/models.py @@ -1,3 +1,9 @@ from django.db import models -# Create your models here. + +class ExamplePlugin(models.Model): + name = models.CharField(unique=True, max_length=255) + + class Meta: + # db_table = "ExamplePlugin" + pass diff --git a/examplePlugin/post_install b/examplePlugin/post_install index c4c6c1c9f..01ec2cce3 100644 --- a/examplePlugin/post_install +++ b/examplePlugin/post_install @@ -1,4 +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 +RESET = '\033[0;0m' +BLUE = "\033[0;34m" +print(BLUE + "Running Post-Install Script..." + RESET) diff --git a/examplePlugin/pre_install b/examplePlugin/pre_install index 6c4fcea9f..c14bef694 100644 --- a/examplePlugin/pre_install +++ b/examplePlugin/pre_install @@ -1,4 +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 +RESET = '\033[0;0m' +GREEN = '\033[0;32m' +print(GREEN + "Running Pre-Install Script..." + RESET) diff --git a/examplePlugin/pre_remove b/examplePlugin/pre_remove new file mode 100644 index 000000000..eb54102ec --- /dev/null +++ b/examplePlugin/pre_remove @@ -0,0 +1,4 @@ +#!/usr/local/CyberCP/bin/python +RESET = '\033[0;0m' +GREEN = '\033[0;32m' +print(GREEN + "Running Pre-Remove Script..." + RESET) diff --git a/examplePlugin/static/examplePlugin/examplePlugin.js b/examplePlugin/static/examplePlugin/examplePlugin.js new file mode 100644 index 000000000..c10ce8398 --- /dev/null +++ b/examplePlugin/static/examplePlugin/examplePlugin.js @@ -0,0 +1,3 @@ +$(document).ready(function () { + console.log("using JS in static file...!"); +}); \ No newline at end of file diff --git a/examplePlugin/templates/examplePlugin/examplePlugin.html b/examplePlugin/templates/examplePlugin/examplePlugin.html new file mode 100644 index 000000000..428ac6c05 --- /dev/null +++ b/examplePlugin/templates/examplePlugin/examplePlugin.html @@ -0,0 +1,52 @@ +{% extends "baseTemplate/index.html" %} +{% load i18n %} +{% block styles %} + +{% endblock %} +{% block title %}Example plugin - CyberPanel{% endblock %} +{% block content %} + {% load static %} + {% get_current_language as LANGUAGE_CODE %} + +
{% trans "Example Plugin Info" %}
+[[ pluginBody ]]
+