diff --git a/README.md b/README.md index fffd4e0..99830e9 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Quick Start To use the Consul-tree you need Python and a web server. - Clone the repo into your web directory. -- After you pull you should execute the following to update the DB +- After you pull you should execute the following to update the DB. ``` python manage.py migrate ``` diff --git a/SAP_CLA.txt b/SAP_CLA.txt new file mode 100644 index 0000000..4e7c368 --- /dev/null +++ b/SAP_CLA.txt @@ -0,0 +1,66 @@ +### SAP Individual Contributor License Agreement + +Thank you for your interest in contributing to open source software projects (“Projects”) made available by SAP SE or its affiliates (“SAP”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SAP in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@sap.com. + + +You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions. + + +**Copyright License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute your Contributions and such derivative works, with the right to sublicense the foregoing rights through multiple tiers of sublicensees. + + +**Patent License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, +worldwide, fully-paid, royalty-free, transferable patent license to make, have made, use, offer to sell, sell, +import, and otherwise transfer your Contributions, where such license applies only to those patent claims +licensable by you that are necessarily infringed by your Contributions alone or by combination of your +Contributions with the Project to which such Contributions were submitted, with the right to sublicense the +foregoing rights through multiple tiers of sublicensees. + + +**Moral Rights.** To the fullest extent permitted under applicable law, you hereby waive, and agree not to +assert, all of your “moral rights” in or relating to your Contributions for the benefit of SAP, its assigns, and +their respective direct and indirect sublicensees. + + +**Third Party Content/Rights.** If your Contribution includes or is based on any source code, object code, bug +fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or +other works of authorship that were not authored by you (“Third Party Content”) or if you are aware of any +third party intellectual property or proprietary rights associated with your Contribution (“Third Party Rights”), +then you agree to include with the submission of your Contribution full details respecting such Third Party +Content and Third Party Rights, including, without limitation, identification of which aspects of your +Contribution contain Third Party Content or are associated with Third Party Rights, the owner/author of the +Third Party Content and Third Party Rights, where you obtained the Third Party Content, and any applicable +third party license terms or restrictions respecting the Third Party Content and Third Party Rights. For greater +certainty, the foregoing obligations respecting the identification of Third Party Content and Third Party Rights +do not apply to any portion of a Project that is incorporated into your Contribution to that same Project. + + +**Representations.** You represent that, other than the Third Party Content and Third Party Rights identified by +you in accordance with this Agreement, you are the sole author of your Contributions and are legally entitled +to grant the foregoing licenses and waivers in respect of your Contributions. If your Contributions were +created in the course of your employment with your past or present employer(s), you represent that such +employer(s) has authorized you to make your Contributions on behalf of such employer(s) or such employer +(s) has waived all of their right, title or interest in or to your Contributions. + + +**Disclaimer.** To the fullest extent permitted under applicable law, your Contributions are provided on an "asis" +basis, without any warranties or conditions, express or implied, including, without limitation, any implied +warranties or conditions of non-infringement, merchantability or fitness for a particular purpose. You are not +required to provide support for your Contributions, except to the extent you desire to provide support. + + +**No Obligation.** You acknowledge that SAP is under no obligation to use or incorporate your Contributions +into any of the Projects. The decision to use or incorporate your Contributions into any of the Projects will be +made at the sole discretion of SAP or its authorized delegates. + + +**Disputes.** This Agreement shall be governed by and construed in accordance with the laws of the State of +New York, United States of America, without giving effect to its principles or rules regarding conflicts of laws, +other than such principles directing application of New York law. The parties hereby submit to venue in, and +jurisdiction of the courts located in New York, New York for purposes relating to this Agreement. In the event +that any of the provisions of this Agreement shall be held by a court or other tribunal of competent jurisdiction +to be unenforceable, the remaining portions hereof shall remain in full force and effect. + + +**Assignment.** You agree that SAP may assign this Agreement, and all of its rights, obligations and licenses +hereunder. \ No newline at end of file diff --git a/account/migrations/0001_initial.py b/account/migrations/0001_initial.py index 85950fb..c5db756 100644 --- a/account/migrations/0001_initial.py +++ b/account/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.5 on 2020-05-10 18:42 +# Generated by Django 3.0.5 on 2020-05-11 12:13 from django.db import migrations, models diff --git a/accounts/admin.py b/accounts/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/accounts/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/accounts/apps.py b/accounts/apps.py deleted file mode 100644 index 9b3fc5a..0000000 --- a/accounts/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class AccountsConfig(AppConfig): - name = 'accounts' diff --git a/accounts/models.py b/accounts/models.py deleted file mode 100644 index 71a8362..0000000 --- a/accounts/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/accounts/urls.py b/accounts/urls.py deleted file mode 100644 index 1322dd5..0000000 --- a/accounts/urls.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.urls import path - -from . import views diff --git a/config/settings.py b/config/settings.py index c5c84b1..9edd84a 100644 --- a/config/settings.py +++ b/config/settings.py @@ -25,10 +25,10 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'accounts.apps.AccountsConfig', # My Apps 'account', + 'consul', ] MIDDLEWARE = [ diff --git a/accounts/__init__.py b/consul/__init__.py similarity index 100% rename from accounts/__init__.py rename to consul/__init__.py diff --git a/consul/admin.py b/consul/admin.py new file mode 100644 index 0000000..2c13182 --- /dev/null +++ b/consul/admin.py @@ -0,0 +1,16 @@ +from django.contrib import admin +from django.contrib.admin import ModelAdmin +from consul.models import Consul + + +class ConsulAdmin(ModelAdmin): + list_display = ('title', 'url') + search_fields = ('title', 'url') + readonly_fields = () + + filter_horizontal = () + list_filter = () + fieldsets = () + + +admin.site.register(Consul, ConsulAdmin) diff --git a/consul/apps.py b/consul/apps.py new file mode 100644 index 0000000..aee83b3 --- /dev/null +++ b/consul/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ConsulConfig(AppConfig): + name = 'consul' diff --git a/consul/migrations/0001_initial.py b/consul/migrations/0001_initial.py new file mode 100644 index 0000000..7fffc66 --- /dev/null +++ b/consul/migrations/0001_initial.py @@ -0,0 +1,23 @@ +# Generated by Django 3.0.5 on 2020-05-11 12:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Consul', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=60)), + ('url', models.CharField(max_length=120)), + ('token', models.CharField(max_length=90)), + ], + ), + ] diff --git a/accounts/migrations/__init__.py b/consul/migrations/__init__.py similarity index 100% rename from accounts/migrations/__init__.py rename to consul/migrations/__init__.py diff --git a/consul/models.py b/consul/models.py new file mode 100644 index 0000000..b0ffaf5 --- /dev/null +++ b/consul/models.py @@ -0,0 +1,10 @@ +from django.db import models + + +class Consul(models.Model): + title = models.CharField(max_length=60) + url = models.CharField(max_length=120) + token = models.CharField(max_length=90) + + def __str__(self): + return self.title diff --git a/accounts/tests.py b/consul/tests.py similarity index 100% rename from accounts/tests.py rename to consul/tests.py diff --git a/accounts/views.py b/consul/views.py similarity index 100% rename from accounts/views.py rename to consul/views.py diff --git a/metadata b/metadata new file mode 100644 index 0000000..e419a8b --- /dev/null +++ b/metadata @@ -0,0 +1,35 @@ +{ + "name": { + "title": "Full Name", + "type": "string", + "githubKey": "name" + }, + "email": { + "title": "E-Mail", + "type": "string", + "githubKey": "email", + "required": true + }, + "age": { + "title": "Age", + "description": "Age in years", + "type": "number", + "minimum": 18, + "maximum": 99 + }, + "agreement": { + "title": "I have read and agree to the CLA", + "type": "boolean", + "required": true + }, + "category": { + "title": "How do you sign?", + "type": { + "enum": [ + "I am signing on behalf of myself.", + "I am signing on behalf of my employer." + ] + }, + "required": true + } +}