From 1ec92ee346fb9b0cdb4442dd11767b1f51014f05 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 12 Jun 2014 23:17:00 +0530 Subject: [PATCH] Add Django urlpattern files for each module This is in anticipation of the routing changes to come. The changes themselves do nothing. --- modules/apps/urls.py | 28 ++++++++++++++++++++++++++++ modules/config/urls.py | 28 ++++++++++++++++++++++++++++ modules/diagnostics/urls.py | 29 +++++++++++++++++++++++++++++ modules/expert_mode/urls.py | 28 ++++++++++++++++++++++++++++ modules/firewall/urls.py | 28 ++++++++++++++++++++++++++++ modules/first_boot/__init__.py | 1 - modules/first_boot/urls.py | 30 ++++++++++++++++++++++++++++++ modules/help/urls.py | 34 ++++++++++++++++++++++++++++++++++ modules/lib/__init__.py | 1 - modules/lib/urls.py | 29 +++++++++++++++++++++++++++++ modules/owncloud/urls.py | 28 ++++++++++++++++++++++++++++ modules/packages/urls.py | 28 ++++++++++++++++++++++++++++ modules/pagekite/urls.py | 29 +++++++++++++++++++++++++++++ modules/system/urls.py | 28 ++++++++++++++++++++++++++++ modules/tor/urls.py | 28 ++++++++++++++++++++++++++++ modules/users/urls.py | 30 ++++++++++++++++++++++++++++++ modules/xmpp/urls.py | 30 ++++++++++++++++++++++++++++++ urls.py | 28 ++++++++++++++++++++++++++++ 18 files changed, 463 insertions(+), 2 deletions(-) create mode 100644 modules/apps/urls.py create mode 100644 modules/config/urls.py create mode 100644 modules/diagnostics/urls.py create mode 100644 modules/expert_mode/urls.py create mode 100644 modules/firewall/urls.py create mode 100644 modules/first_boot/urls.py create mode 100644 modules/help/urls.py create mode 100644 modules/lib/urls.py create mode 100644 modules/owncloud/urls.py create mode 100644 modules/packages/urls.py create mode 100644 modules/pagekite/urls.py create mode 100644 modules/system/urls.py create mode 100644 modules/tor/urls.py create mode 100644 modules/users/urls.py create mode 100644 modules/xmpp/urls.py create mode 100644 urls.py diff --git a/modules/apps/urls.py b/modules/apps/urls.py new file mode 100644 index 000000000..a65383f51 --- /dev/null +++ b/modules/apps/urls.py @@ -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 . +# + +""" +URLs for the Apps module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.apps.apps', + url(r'^apps/$', 'index') + ) diff --git a/modules/config/urls.py b/modules/config/urls.py new file mode 100644 index 000000000..e40bdf15a --- /dev/null +++ b/modules/config/urls.py @@ -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 . +# + +""" +URLs for the Configuration module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.config.config', + url(r'^sys/config/$', 'index'), + ) diff --git a/modules/diagnostics/urls.py b/modules/diagnostics/urls.py new file mode 100644 index 000000000..5b3d94653 --- /dev/null +++ b/modules/diagnostics/urls.py @@ -0,0 +1,29 @@ +# +# 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 . +# + +""" +URLs for the Diagnostics module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.diagnostics.diagnostics', + url(r'^sys/diagnostics/$', 'index'), + url(r'^sys/diagnostics/test/$', 'test'), + ) diff --git a/modules/expert_mode/urls.py b/modules/expert_mode/urls.py new file mode 100644 index 000000000..83ed46428 --- /dev/null +++ b/modules/expert_mode/urls.py @@ -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 . +# + +""" +URLs for the Expert Mode module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.expert_mode.expert_mode', + url(r'^sys/expert/$', 'index'), + ) diff --git a/modules/firewall/urls.py b/modules/firewall/urls.py new file mode 100644 index 000000000..62ae413e7 --- /dev/null +++ b/modules/firewall/urls.py @@ -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 . +# + +""" +URLs for the Firewall module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.firewall.firewall', + url(r'^sys/firewall/$', 'index') + ) diff --git a/modules/first_boot/__init__.py b/modules/first_boot/__init__.py index 20e972dae..b9a2a74f5 100644 --- a/modules/first_boot/__init__.py +++ b/modules/first_boot/__init__.py @@ -21,5 +21,4 @@ Plinth module for first boot wizard from . import first_boot - __all__ = ['first_boot'] diff --git a/modules/first_boot/urls.py b/modules/first_boot/urls.py new file mode 100644 index 000000000..6fa4aadc4 --- /dev/null +++ b/modules/first_boot/urls.py @@ -0,0 +1,30 @@ +# +# 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 . +# + +""" +URLs for the First Boot module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.first_boot.first_boot', + url(r'^firstboot/$', 'index'), + url(r'^firstboot/state0/$', 'state0'), + url(r'^firstboot/state1/$', 'state1') + ) diff --git a/modules/help/urls.py b/modules/help/urls.py new file mode 100644 index 000000000..3c623ebcc --- /dev/null +++ b/modules/help/urls.py @@ -0,0 +1,34 @@ +# +# 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 . +# + +""" +URLs for the Help module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.help.help', + url(r'^help/$', 'index'), + url(r'^help/index/$', 'index'), + url(r'^help/about/$', 'about'), + url(r'^help/view/(?Pdesign)/$', 'default'), + url(r'^help/view/(?Pplinth)/$', 'default'), + url(r'^help/view/(?Phacking)/$', 'default'), + url(r'^help/view/(?Pfaq)/$', 'default'), + ) diff --git a/modules/lib/__init__.py b/modules/lib/__init__.py index ab399cd3f..3b0136b8c 100644 --- a/modules/lib/__init__.py +++ b/modules/lib/__init__.py @@ -23,7 +23,6 @@ from . import auth from . import auth_page from . import user_store - __all__ = ['auth', 'auth_page', 'user_store'] diff --git a/modules/lib/urls.py b/modules/lib/urls.py new file mode 100644 index 000000000..7a0cac762 --- /dev/null +++ b/modules/lib/urls.py @@ -0,0 +1,29 @@ +# +# 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 . +# + +""" +URLs for the Lib module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.lib.auth_page', + url(r'^auth/login/$', 'login'), + url(r'^auth/logout/$', 'logout') + ) diff --git a/modules/owncloud/urls.py b/modules/owncloud/urls.py new file mode 100644 index 000000000..5ad666505 --- /dev/null +++ b/modules/owncloud/urls.py @@ -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 . +# + +""" +URLs for the ownCloud module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.owncloud.owncloud', + url(r'^apps/owncloud/$', 'index'), + ) diff --git a/modules/packages/urls.py b/modules/packages/urls.py new file mode 100644 index 000000000..ae963fb4e --- /dev/null +++ b/modules/packages/urls.py @@ -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 . +# + +""" +URLs for the Packages module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.packages.packages', + url(r'^sys/packages/$', 'index'), + ) diff --git a/modules/pagekite/urls.py b/modules/pagekite/urls.py new file mode 100644 index 000000000..8cbad4dd5 --- /dev/null +++ b/modules/pagekite/urls.py @@ -0,0 +1,29 @@ +# +# 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 . +# + +""" +URLs for the PageKite module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.pagekite.pagekite', + url(r'^apps/pagekite/$', 'index'), + url(r'^apps/pagekite/configure/$', 'configure'), + ) diff --git a/modules/system/urls.py b/modules/system/urls.py new file mode 100644 index 000000000..054f9afcc --- /dev/null +++ b/modules/system/urls.py @@ -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 . +# + +""" +URLs for the System module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.system.system', + url(r'^sys/$', 'index'), + ) diff --git a/modules/tor/urls.py b/modules/tor/urls.py new file mode 100644 index 000000000..95e0422fc --- /dev/null +++ b/modules/tor/urls.py @@ -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 . +# + +""" +URLs for the Tor module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.tor.tor', + url(r'^apps/tor/$', 'index') + ) diff --git a/modules/users/urls.py b/modules/users/urls.py new file mode 100644 index 000000000..8fb5d21cd --- /dev/null +++ b/modules/users/urls.py @@ -0,0 +1,30 @@ +# +# 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 . +# + +""" +URLs for the Users module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.users.users', + url(r'^sys/users/$', 'index'), + url(r'^sys/users/add/$', 'add'), + url(r'^sys/users/edit/$', 'edit') + ) diff --git a/modules/xmpp/urls.py b/modules/xmpp/urls.py new file mode 100644 index 000000000..43a518c87 --- /dev/null +++ b/modules/xmpp/urls.py @@ -0,0 +1,30 @@ +# +# 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 . +# + +""" +URLs for the XMPP module +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'modules.xmpp.xmpp', + url(r'^apps/xmpp/$', 'index'), + url(r'^apps/xmpp/configure/$', 'configure'), + url(r'^apps/xmpp/register/$', 'register') + ) diff --git a/urls.py b/urls.py new file mode 100644 index 000000000..a2611e009 --- /dev/null +++ b/urls.py @@ -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 . +# + +""" +Django URLconf file containing all urls +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( # pylint: disable-msg=C0103 + 'views', + url(r'^$', 'index') + )