diff --git a/web_no_crawler/README.rst b/web_no_crawler/README.rst new file mode 100644 index 000000000..38929e877 --- /dev/null +++ b/web_no_crawler/README.rst @@ -0,0 +1,35 @@ +**This file is going to be generated by oca-gen-addon-readme.** + +*Manual changes will be overwritten.* + +Please provide content in the ``readme`` directory: + +* **DESCRIPTION.rst** (required) +* INSTALL.rst (optional) +* CONFIGURE.rst (optional) +* **USAGE.rst** (optional, highly recommended) +* DEVELOP.rst (optional) +* ROADMAP.rst (optional) +* HISTORY.rst (optional, recommended) +* **CONTRIBUTORS.rst** (optional, highly recommended) +* CREDITS.rst (optional) + +Content of this README will also be drawn from the addon manifest, +from keys such as name, authors, maintainers, development_status, +and license. + +A good, one sentence summary in the manifest is also highly recommended. + + +Automatic changelog generation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`HISTORY.rst` can be auto generated using `towncrier `_. + +Just put towncrier compatible changelog fragments into `readme/newsfragments` +and the changelog file will be automatically generated and updated when a new fragment is added. + +Please refer to `towncrier` documentation to know more. + +NOTE: the changelog will be automatically generated when using `/ocabot merge $option`. +If you need to run it manually, refer to `OCA/maintainer-tools README `_. diff --git a/web_no_crawler/__init__.py b/web_no_crawler/__init__.py new file mode 100644 index 000000000..987085450 --- /dev/null +++ b/web_no_crawler/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2018 Ventor, Xpansa Group () +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +from . import controllers diff --git a/web_no_crawler/__manifest__.py b/web_no_crawler/__manifest__.py new file mode 100644 index 000000000..94258a833 --- /dev/null +++ b/web_no_crawler/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright (C) 2018 Ventor, Xpansa Group () +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +{ + 'name': 'Disallow indexing completely via robots.txt', + 'author': 'Ventor, Xpansa Group, Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/web', + 'category': 'web', + 'version': '12.0.1.0.0', + 'depends': [ + 'web', + ], + 'installable': True, + 'license': 'LGPL-3', +} diff --git a/web_no_crawler/controllers/__init__.py b/web_no_crawler/controllers/__init__.py new file mode 100644 index 000000000..ef0176ce7 --- /dev/null +++ b/web_no_crawler/controllers/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2018 Ventor, Xpansa Group () +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +from . import main diff --git a/web_no_crawler/controllers/main.py b/web_no_crawler/controllers/main.py new file mode 100644 index 000000000..feaba5404 --- /dev/null +++ b/web_no_crawler/controllers/main.py @@ -0,0 +1,14 @@ +# Copyright (C) 2018 Ventor, Xpansa Group () +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). +from odoo import http +from odoo.addons.web.controllers.main import Home + + +class Main(Home): + + @http.route('/robots.txt', type='http', auth="none") + def robots(self): + return http.request.make_response( + "User-agent: *\nDisallow: /", + [('Content-Type', 'text/plain')], + ) diff --git a/web_no_crawler/i18n/web_no_crawler.pot b/web_no_crawler/i18n/web_no_crawler.pot new file mode 100644 index 000000000..386b25585 --- /dev/null +++ b/web_no_crawler/i18n/web_no_crawler.pot @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + diff --git a/web_no_crawler/readme/CONTRIBUTORS.rst b/web_no_crawler/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..1aa4c7626 --- /dev/null +++ b/web_no_crawler/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Nedas Zilinskas (http://xpansa.com) +* Stefan Rijnhart diff --git a/web_no_crawler/readme/CREDITS.rst b/web_no_crawler/readme/CREDITS.rst new file mode 100644 index 000000000..eed428e7c --- /dev/null +++ b/web_no_crawler/readme/CREDITS.rst @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +* Ventor, Xpansa Group () diff --git a/web_no_crawler/readme/DESCRIPTION.rst b/web_no_crawler/readme/DESCRIPTION.rst new file mode 100644 index 000000000..8e20bb0a7 --- /dev/null +++ b/web_no_crawler/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module was written to implement a robots.txt file to prevent web crawlers (like google) from indexing pages. +This module does not depend on Website module. diff --git a/web_no_crawler/readme/INSTALL.rst b/web_no_crawler/readme/INSTALL.rst new file mode 100644 index 000000000..428aa0302 --- /dev/null +++ b/web_no_crawler/readme/INSTALL.rst @@ -0,0 +1,3 @@ +Installation as usual. No specific installation steps / configuration required. + +**WARNING:** this module is not to be used with `Website` module as it has a separate functionality for robots.txt. diff --git a/web_no_crawler/readme/ROADMAP.rst b/web_no_crawler/readme/ROADMAP.rst new file mode 100644 index 000000000..3bcd4a085 --- /dev/null +++ b/web_no_crawler/readme/ROADMAP.rst @@ -0,0 +1 @@ +* Investigate possibilies for compatibility with `Website` module as it has a separate functionality for robots.txt. diff --git a/web_no_crawler/readme/USAGE.rst b/web_no_crawler/readme/USAGE.rst new file mode 100644 index 000000000..db4aee1dc --- /dev/null +++ b/web_no_crawler/readme/USAGE.rst @@ -0,0 +1,3 @@ +To use this module, you need to: + +No configuration needed. Once installed adds robots.txt (ex.: http://example.org/robots.txt). diff --git a/web_no_crawler/static/description/icon.png b/web_no_crawler/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/web_no_crawler/static/description/icon.png differ