Reorganize python sources into 'plinth' package

This commit is contained in:
Sunil Mohan Adapa committed 2014-08-29 12:57:27 +05:30
1 parent eaacd3864b
commit 65fa648d9f
109 files changed
+63 -61

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Plinth module for Apps section page
"""
from . import apps
from .apps import init
__all__ = ['apps', 'init']
+14
View File
@@ -0,0 +1,14 @@
from django.template.response import TemplateResponse
from gettext import gettext as _
from plinth import cfg
def init():
"""Initailize the apps module"""
cfg.main_menu.add_urlname("Apps", "icon-download-alt", "apps:index", 80)
def index(request):
"""Serve the apps index page"""
return TemplateResponse(request, 'apps.html', {'title': _('Applications')})
+31
View File
@@ -0,0 +1,31 @@
{% extends 'base.html' %}
{% comment %}
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
{% endcomment %}
{% block main_block %}
<p>User Applications are web apps hosted on your
{{ cfg.product_name }}.</p>
<p>Eventually this box could be your photo sharing site, your instant
messaging site, your social networking site, your news site. Remember
web portals? We can be one of those too. Many of the services you
use on the web could soon be on site and under your control!</p>
{% endblock %}
+28
View File
@@ -0,0 +1,28 @@
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
URLs for the Apps module
"""
from django.conf.urls import patterns, url
urlpatterns = patterns( # pylint: disable-msg=C0103
'plinth.modules.apps.apps',
url(r'^apps/$', 'index', name='index')
)