2018-02-23 22:48:32 +00:00
|
|
|
from app.plugins import PluginBase, Menu, MountPoint
|
|
|
|
from django.shortcuts import render
|
2020-12-14 21:18:00 +00:00
|
|
|
from django.utils.translation import gettext as _
|
2023-03-20 05:32:15 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2018-02-23 22:48:32 +00:00
|
|
|
|
|
|
|
class Plugin(PluginBase):
|
|
|
|
|
|
|
|
def main_menu(self):
|
2020-12-14 21:18:00 +00:00
|
|
|
return [Menu(_("GCP Interface"), self.public_url(""), "fa fa-map-marker-alt fa-fw")]
|
2018-02-23 22:48:32 +00:00
|
|
|
|
2018-03-19 16:26:10 +00:00
|
|
|
def app_mount_points(self):
|
2023-03-20 05:32:15 +00:00
|
|
|
@login_required
|
|
|
|
def gcpi(request):
|
|
|
|
return render(request, self.template_path("app.html"), {'title': 'GCP Editor'})
|
|
|
|
|
2018-03-01 21:29:23 +00:00
|
|
|
return [
|
2023-03-20 05:32:15 +00:00
|
|
|
MountPoint('$', gcpi)
|
2018-03-01 21:29:23 +00:00
|
|
|
]
|
2018-02-23 22:48:32 +00:00
|
|
|
|
|
|
|
|